Ejemplo n.º 1
0
    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);
    }
Ejemplo n.º 2
0
    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);    
    }