Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

// assume pMyFont is a valid initialized font resource pointer
static uint16_t counter = 0;
GFX_XCHAR charArray[] = "Test String";
GFX_XCHAR pChar = NULL;
GFX_STATUS status;
GFX_ColorSet(WHITE);
GFX_FontSet(pMyFont);
// render the whole string
GFX_TextStringDraw(10, 10, charArray, 0);
// render ONLY the "Test" portion of the string
GFX_TextStringDraw(10, 30, charArray, 4);
// render ONLY the "String" portion of the string
pChar = charArray;
pChar += 5;
GFX_TextStringDraw(10, 50, pChar, 0);
// doing this also renders ONLY the "String" portion of the string
GFX_TextStringDraw(10, 70, pChar, 6);
Parameters
Parameters Description
x Horizontal starting position of the string.
y Vertical position position of the string.
pString Pointer to the location of the string that will be rendered.
length Total number of characters to be rendered. When set to 0,
the function will terminate until the null character is detected.
Function
GFX_STATUS GFX_TextStringDraw(
uint16_t x,
uint16_t y,
GFX_XCHAR *pString,
uint16_t length)
1.6.1.1.6.11 GFX_TextStringHeightGet Function
This function returns the height of the given font.
File
gfx_primitive.h
Syntax
uint16_t GFX_TextStringHeightGet(GFX_RESOURCE_HDR * pFont);
Returns
The height of the specified font in pixels.
Description
This function returns the height of the given font in pixels. The given font must be present in the system.
This function return value is undefined if the given pointer does not point to a valid font.
Preconditions
None.
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
106

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh