void SDLImage::putPixel(int x, int y, const Color& color) { if (mSurface == NULL) { throw FCN_EXCEPTION("Trying to put a pixel in a non loaded image."); } SDLputPixel(mSurface, x, y, color); }
void SDLImageLoader::putPixel(int x, int y, const Color& color) { 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."); } SDLputPixel(mCurrentImage, x, y, color); }