MSP Graphics Library
|
void Graphics_clearDisplay | ( | const Graphics_Context * | context | ) |
Forces a clear screen. Contents of Display buffer unmodified
context | is a pointer to the drawing context to use. |
This function forces a clear screen.
void Graphics_drawPixel | ( | const Graphics_Context * | context, |
uint16_t | x, | ||
uint16_t | y | ||
) |
Draws a pixel.
context | is a pointer to the drawing context to use. |
x | is the X coordinate of the pixel. |
y | is the Y coordinate of the pixel. |
This function draws a pixel if it resides within the clipping region.
void Graphics_flushBuffer | ( | const Graphics_Context * | context | ) |
Flushes any cached drawing operations.
context | is a pointer to the drawing context to use. |
This function flushes any cached drawing operations. For display drivers that draw into a local frame buffer before writing to the actual display, calling this function will cause the display to be updated to match the contents of the local frame buffer.
uint16_t Graphics_getDisplayHeight | ( | Graphics_Context * | context | ) |
Gets the height of the display being used by this drawing context.
context | is a pointer to the drawing context to query. |
This function returns the height of the display that is being used by this drawing context.
uint16_t Graphics_getDisplayWidth | ( | Graphics_Context * | context | ) |
Gets the width of the display being used by this drawing context.
context | is a pointer to the drawing context to query. |
This function returns the width of the display that is being used by this drawing context.
uint8_t Graphics_getFontBaseline | ( | const Graphics_Font * | font | ) |
Gets the baseline of a font.
font | is a pointer to the font to query. |
This function determines the baseline position of a font. The baseline is the offset between the top of the font and the bottom of the capital letters. The only font data that exists below the baseline are the descenders on some lower-case letters (such as ``y'').
uint8_t Graphics_getFontHeight | ( | const Graphics_Font * | font | ) |
Gets the height of a font.
font | is a pointer to the font to query. |
This function determines the height of a font. The height is the offset between the top of the font and the bottom of the font, including any ascenders and descenders.
uint8_t Graphics_getFontMaxWidth | ( | const Graphics_Font * | font | ) |
Gets the maximum width of a font.
font | is a pointer to the font to query. |
This function determines the maximum width of a font. The maximum width is the width of the widest individual character in the font.
uint16_t Graphics_getHeightOfDisplay | ( | const Graphics_Display * | display | ) |
Gets the height of the display.
display | is a pointer to the display driver structure for the display to query. |
This function determines the height of the display.
uint16_t Graphics_getWidthOfDisplay | ( | const Graphics_Display * | display | ) |
Gets the width of the display.
display | is a pointer to the display driver structure for the display to query. |
This function determines the width of the display.
void Graphics_initContext | ( | Graphics_Context * | context, |
Graphics_Display * | display, | ||
const Graphics_Display_Functions * | pFxns | ||
) |
Initializes a drawing context.
context | is a pointer to the drawing context to initialize. |
display | is a pointer to the Graphics_Display Info structure that describes the display driver to use. |
pFxns | isa pointer to driver functions. |
This function initializes a drawing context, preparing it for use. The provided display driver will be used for all subsequent graphics operations, and the default clipping region will be set to the extent of the screen.
void Graphics_setBackgroundColor | ( | Graphics_Context * | context, |
int32_t | value | ||
) |
Sets the background color to be used.
context | is a pointer to the drawing context to modify. |
value | is the 24-bit RGB color to be used. |
This function sets the background color to be used for drawing operations in the specified drawing context.
void Graphics_setBackgroundColorTranslated | ( | Graphics_Context * | context, |
int32_t | value | ||
) |
Sets the background color to be used.
context | is a pointer to the drawing context to modify. |
value | is the display driver-specific color to be used. |
This function sets the background color to be used for drawing operations in the specified drawing context, using a color that has been previously translated to a driver-specific color (for example, via Graphics_translateColorDisplay()).
void Graphics_setClipRegion | ( | Graphics_Context * | context, |
Graphics_Rectangle * | rect | ||
) |
Sets the extents of the clipping region.
context | is a pointer to the drawing context to use. |
rect | is a pointer to the structure containing the extents of the clipping region. |
This function sets the extents of the clipping region. The clipping region is not allowed to exceed the extents of the screen, but may be a portion of the screen.
The supplied coordinate are inclusive; xMin of 1 and xMax of 1 will define a clipping region that will display only the pixels in the X = 1 column. A consequence of this is that the clipping region must contain at least one row and one column.
void Graphics_setFont | ( | Graphics_Context * | context, |
const Graphics_Font * | font | ||
) |
Sets the font to be used.
context | is a pointer to the drawing context to modify. |
font | is a pointer to the font to be used. |
This function sets the font to be used for string drawing operations in the specified drawing context. If a tFontEx type font is to be used, cast its pointer to a font pointer before passing it as the font parameter.
void Graphics_setForegroundColor | ( | Graphics_Context * | context, |
int32_t | value | ||
) |
Sets the foreground color to be used.
context | is a pointer to the drawing context to modify. |
value | is the 24-bit RGB color to be used. |
This function sets the color to be used for drawing operations in the specified drawing context.
void Graphics_setForegroundColorTranslated | ( | Graphics_Context * | context, |
int32_t | value | ||
) |
Sets the foreground color to be used.
context | is a pointer to the drawing context to modify. |
value | is the display driver-specific color to be used. |
This function sets the foreground color to be used for drawing operations in the specified drawing context, using a color that has been previously translated to a driver-specific color (for example, via Graphics_translateColorDisplay()).