Functions
Image_api

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)
 

Detailed Description

Function Documentation

void Graphics_drawImage ( const Graphics_Context context,
const Graphics_Image bitmap,
int16_t  x,
int16_t  y 
)

Draws a bitmap image.

Parameters
contextis a pointer to the drawing context to use.
bitmapis a pointer to the image to draw.
xis the X coordinate of the upper left corner of the image.
yis 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.

Returns
None.

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.

Parameters
imageis 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.

Returns
Returns the number of colors in the image.

References Graphics_Image::numColors.

uint16_t Graphics_getImageHeight ( const Graphics_Image image)

Gets the height of an image.

Parameters
imageis a tImage struct

This function determines the height of an image in pixels.

Returns
Returns the height of the image in pixels.

References Graphics_Image::ySize.

uint16_t Graphics_getImageWidth ( const Graphics_Image image)

Gets the width of an image.

Parameters
imageis a tImage struct

This function determines the width of an image in pixels.

Returns
Returns the width of the 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.

Parameters
widthis the width of the image in pixels.
heightis 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.

Returns
Returns the number of bytes required by the image.
uint32_t Graphics_getOffscreen4BppImageSize ( uint16_t  width,
uint16_t  height 
)

Determines the size of the buffer for a 4 BPP off-screen image.

Parameters
widthis the width of the image in pixels.
heightis 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.

Returns
Returns the number of bytes required by the image.
uint32_t Graphics_getOffScreen8BPPSize ( uint16_t  width,
uint16_t  height 
)

Determines the size of the buffer for an 8 BPP off-screen image.

Parameters
widthis the width of the image in pixels.
heightis 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.

Returns
Returns the number of bytes required by the image.

Copyright 2016, Texas Instruments Incorporated