コード例 #1
0
ファイル: ImageAccess.cpp プロジェクト: K4stor/nice-core
int ImageAccess::getPixelInt(int x, int y, int channel) const {
  if (channel != 1) {
    fthrow(Exception, "channel must be 1 for single channel images.");
  }
  return getPixelInt(x, y);
}
コード例 #2
0
ファイル: Surface.cpp プロジェクト: jordsti/stigame
    Pixel* Surface::getPixel(int p_x, int p_y)
    {
        Uint32 px = getPixelInt(p_x, p_y);

        return new Pixel(px, sdlSurface->format);
    }