# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 97
- 98
- 99
- 100
- 101
…
- 373
- 374

GFX_XCHAR myString[] = "Microchip Technology Inc.";
if (GFX_FontAntiAliasGet() != GFX_FONT_ANTIALIAS_OPAQUE)
GFX_FontAntiAliasSet(GFX_FONT_ANTIALIAS_OPAQUE);
GFX_FontSet((GFX_RESOURCE_HDR*) &antiAliasedFont25);
GFX_ColorSet(GFX_X11_GREEN);
width = GFX_TextStringWidthGet(myString, (GFX_RESOURCE_HDR*) &Font25);
height = GFX_TextStringHeightGet((GFX_RESOURCE_HDR*) &antiAliasedFont25);
GFX_TextStringDraw( (GFX_MaxXGet() - width) >> 1,
(GFX_MaxYGet() - height) >> 1,
myString,
0);
Function
GFX_FONT_ANTIALIAS_TYPE GFX_FontAntiAliasGet(void)
1.6.1.1.6.2 GFX_FontAntiAliasSet Function
This function sets the font anti-aliasing mode.
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_FontAntiAliasSet(GFX_FONT_ANTIALIAS_TYPE type);
Returns
The status of the set anti-aliasing mode action.
Description
This function sets the font anti-aliasing mode used when rendering anti-aliased strings and characters.
Preconditions
None.
Example
extern const GFX_RESOURCE_HDR antiAliasedFont25;
uint16_t width, height;
GFX_XCHAR myString[] = "Microchip Technology Inc.";
GFX_FontAntiAliasSet(GFX_FONT_ANTIALIAS_TRANSLUCENT);
GFX_FontSet((GFX_RESOURCE_HDR*) &antiAliasedFont25);
GFX_ColorSet(GFX_X11_GREEN);
width = GFX_TextStringWidthGet( myString,
(GFX_RESOURCE_HDR*) &Font25);
height = GFX_TextStringHeightGet((GFX_RESOURCE_HDR*) &antiAliasedFont25);
GFX_TextStringDraw( (GFX_MaxXGet() - width) >> 1,
(GFX_MaxYGet() - height) >> 1,
myString,
0);
Parameters
Parameters Description
type anti-aliasing mode selected. See
GFX_FONT_ANTIALIAS_TYPE for details.
Function
GFX_STATUS GFX_FontAntiAliasSet(GFX_FONT_ANTIALIAS_TYPE type)
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
99

- 1
- 2
…
- 97
- 98
- 99
- 100
- 101
…
- 373
- 374