32 #ifndef __IMAGE_HEADERFILE__ 33 #define __IMAGE_HEADERFILE__ 68 void clear(
int nRed,
int nGreen,
int nBlue);
71 void clear(
unsigned short nColor);
82 int nSx0,
int nSy0,
int nSx1,
int nSy1,
83 bool nTransparent=
false);
91 void drawImage(
int nX,
int nY,
const Image* nImage,
bool nTransparent=
false);
99 void fillRect(
int nX0,
int nY0,
int nX1,
int nY1,
int nRed,
int nGreen,
int nBlue,
int nTransparency=0);
106 void fillRect(
int nX0,
int nY0,
int nX1,
int nY1,
unsigned short nColor,
int nTransparency=0);
112 void drawLine(
int x1,
int y1,
int x2,
int y2,
unsigned short col);
118 void drawLine(
int x1,
int y1,
int x2,
int y2,
int r,
int g,
int b);
124 void setPixel(
int x,
int y,
unsigned short col);
130 void setPixel(
int x,
int y,
int r,
int g,
int b);
149 void setPixels(
int nWidth,
int nHeight,
unsigned short* nPixels,
bool nPixelsOwner);
154 Image(
int nWidth,
int nHeight,
unsigned short* nPixels,
bool nPixelsOwner)
175 #endif //__IMAGE_HEADERFILE__ void setPixel(int x, int y, unsigned short col)
Sets a pixel.
int getHeight() const
Returns the height of the image.
void drawLine(int x1, int y1, int x2, int y2, unsigned short col)
Renders a straight line from x1/y1 to x2/y1 with the color 'col'.
void drawImage(int nX, int nY, const Image *nImage, int nSx0, int nSy0, int nSx1, int nSy1, bool nTransparent=false)
Draws another bitmap inside this bitmap.
static Image * createFromPixelBuffer(int nWidth, int nHeight, unsigned short *nPixels, bool nOwner)
Creates an Image object directly from a pixel buffer.
void fillRect(int nX0, int nY0, int nX1, int nY1, int nRed, int nGreen, int nBlue, int nTransparency=0)
Fills a rectangle with the given color ans transparency.
TFSIMD_FORCE_INLINE const tfScalar & y() const
unsigned short getColorKey() const
void clear(int nRed, int nGreen, int nBlue)
Clears the bitmap with the given RGB color.
void setPixels(int nWidth, int nHeight, unsigned short *nPixels, bool nPixelsOwner)
Sets a new pixel buffer.
void setTransparentColor(int nRed, int nGreen, int nBlue)
Sets the color key that is treated as transparent.
TFSIMD_FORCE_INLINE const tfScalar & x() const
Image(int nWidth, int nHeight, unsigned short *nPixels, bool nPixelsOwner)
int getWidth() const
Returns the width of the image.
const unsigned short * getPixels() const
Returns the pixel buffer.
The Image class provides basic RGB565 image handing capabilities.
unsigned short * getPixels()
Returns the pixel buffer.
unsigned short getPixel(int nX, int nY) const
Returns a pixel.