Functions | |
void | Graphics_drawImage (const Graphics_Context *context, const Graphics_Image *bitmap, int16_t x, int16_t y) |
uint16_t | Graphics_getImageColors (const Graphics_Image *image) |
uint16_t | Graphics_getImageHeight (const Graphics_Image *image) |
uint16_t | Graphics_getImageWidth (const Graphics_Image *image) |
uint32_t | Graphics_getOffscreen1BppImageSize (uint16_t width, uint16_t height) |
uint32_t | Graphics_getOffscreen4BppImageSize (uint16_t width, uint16_t height) |
uint32_t | Graphics_getOffScreen8BPPSize (uint16_t width, uint16_t height) |
void Graphics_drawImage | ( | const Graphics_Context * | context, |
const Graphics_Image * | bitmap, | ||
int16_t | x, | ||
int16_t | y | ||
) |
Draws a bitmap image.
context | is a pointer to the drawing context to use. |
bitmap | is a pointer to the image to draw. |
x | is the X coordinate of the upper left corner of the image. |
y | is the Y coordinate of the upper left corner of the image. |
This function draws a bitmap image. The image may be 1 bit per pixel, 4 bits per pixel or 8 bits per pixel (using a palette supplied in the image data). It can be uncompressed data, or it can be compressed using several different compression types. Compression options are 4-bit run length encoding, 8-bit run length encoding, and a custom run length encoding variation written for complex 8-bit per pixel images.
References Graphics_Image::bPP, Graphics_Context::clipRegion, Graphics_Context::display, Graphics_drawMultiplePixelsOnDisplay(), Graphics_drawPixelOnDisplay(), Graphics_Image::pPixel, Graphics_Rectangle::xMax, Graphics_Rectangle::xMin, Graphics_Image::xSize, Graphics_Rectangle::yMax, Graphics_Rectangle::yMin, and Graphics_Image::ySize.
Referenced by Graphics_drawImageButton(), Graphics_drawReleasedImageButton(), and Graphics_drawSelectedImageButton().
uint16_t Graphics_getImageColors | ( | const Graphics_Image * | image | ) |
Gets the number of colors in an image.
image | is a tImage struct |
This function determines the number of colors in the palette of an image. This is only valid for 4bpp and 8bpp images; 1bpp images do not contain a palette.
References Graphics_Image::numColors.
uint16_t Graphics_getImageHeight | ( | const Graphics_Image * | image | ) |
Gets the height of an image.
image | is a tImage struct |
This function determines the height of an image in pixels.
References Graphics_Image::ySize.
uint16_t Graphics_getImageWidth | ( | const Graphics_Image * | image | ) |
Gets the width of an image.
image | is a tImage struct |
This function determines the width of an image in pixels.
References Graphics_Image::xSize.
uint32_t Graphics_getOffscreen1BppImageSize | ( | uint16_t | width, |
uint16_t | height | ||
) |
Determines the size of the buffer for a 1 BPP off-screen image.
width | is the width of the image in pixels. |
height | is the height of the image in pixels. |
This function determines the size of the memory buffer required to hold a 1 BPP off-screen image of the specified geometry.
uint32_t Graphics_getOffscreen4BppImageSize | ( | uint16_t | width, |
uint16_t | height | ||
) |
Determines the size of the buffer for a 4 BPP off-screen image.
width | is the width of the image in pixels. |
height | is the height of the image in pixels. |
This function determines the size of the memory buffer required to hold a 4 BPP off-screen image of the specified geometry.
uint32_t Graphics_getOffScreen8BPPSize | ( | uint16_t | width, |
uint16_t | height | ||
) |
Determines the size of the buffer for an 8 BPP off-screen image.
width | is the width of the image in pixels. |
height | is the height of the image in pixels. |
This function determines the size of the memory buffer required to hold an 8 BPP off-screen image of the specified geometry.