Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
The color is set by GFX_ColorSet() while the font is set by GFX_FontSet().
Multiple lines of strings can be rendered. To define string composed of multiple lines, end each line with a new line character
(character ID 0x0A). Each line will be rendered according to the text alignment (See GFX_TEXT_ALIGNMENT).
When the length parameter is set to 0, the string will be rendered until the null character is reached. When the length
parameter is greater than 0, the string will be rendered until one of the following cases occurs:
• null character is reached before the total rendered characters is less than the value of length
• total rendered characters is equal to the value of length before the null character is reached.
The rendering of the character becomes undefined when any one of the following is true:
• x, y, width and height defines an area partially or fully outside outside the frame buffer.
• Color is not set, before this function is called.
• Font is not set, before this function is called.
Preconditions
Color must be set by GFX_ColorSet(). Font must be set by GFX_FontSet().
Example
// assume APP_DEMO_FONT to be a valid font resource
GFX_XCHAR StringMsg[] = "Hello World";
GFX_ColorSet(BLACK);
GFX_ScreenClear();
GFX_ColorSet(WHITE);
GFX_FontSet((GFX_RESOURCE_HDR*)&APP_DEMO_FONT);
// displayed message will be centered on the screen
while(GFX_TextStringBoxDraw( 0, 0,
GFX_MaxXGet(), GFX_MaxYGet(),
StringMsg,
0, GFX_ALIGN_CENTER) !=
GFX_STATUS_SUCCESS);
Parameters
Parameters Description
x Horizontal starting position of the rectangular area.
y Vertical position position of the rectangular area.
width Defines the width of the rectangular area.
height Defines the height of the rectangular area.
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
104
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf