コード例 #1
0
ファイル: sdlimage.cpp プロジェクト: Beliaar/fifechan
    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);
    }
コード例 #2
0
ファイル: sdlimageloader.cpp プロジェクト: k1643/StratagusAI
    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);    
    }