Color SDLImage::getPixel(int x, int y) { if (mSurface == NULL) { throw FCN_EXCEPTION("Trying to get a pixel from a non loaded image."); } return SDLgetPixel(mSurface, x, y); }
Color SDLImageLoader::getPixel(int x, int y) { if (mCurrentImage == NULL) { throw GCN_EXCEPTION("No image prepared."); } if (x < 0 || y < 0 || x >= mCurrentImage->w || y >= mCurrentImage->h) { throw GCN_EXCEPTION("x and y out of image bound."); } return SDLgetPixel(mCurrentImage, x, y); }