# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 223
- 224
- 225
- 226
- 227
…
- 373
- 374

• pTitleFont and pValueFont is not defined to a valid font GFX_RESOURC_HDR
• pScheme is not pointing to a GFX_GOL_OBJ_SCHEME
• pText is an unterminated string
Preconditions
None.
Example
#define ID_METER 101
extern const FONT_FLASH GOLMediumFont; // medium font
extern const FONT_FLASH GOLSmallFont; // small font
GFX_GOL_OBJ_SCHEME *pMeterScheme;
GFX_GOL_METER *pMtr;
// assume pMeterScheme is initialized to a scheme in memory.
// draw object after creation
state = GFX_GOL_METER_DRAW_STATE | GFX_GOL_METER_RING_STATE;
pMtr = GFX_GOL_MeterCreate(
ID_METER, // assign ID
30, 50, 150, 180, // set dimension
state,
GFX_GOL_METER_WHOLE_TYPE, // type of meter
0, // set initial value
0, 100, // set min and max value
&GOLMediumFont, // set title font
&GOLSmallFont, // set value font
"Speed", // Text Label
pMeterScheme); // style scheme
// check if meter was created
if (pMtr == NULL)
return 0;
// Change range colors: Normal values to WHITE
// Critical values to BLUE
// Danger values to RED
// assume that WHITE, GREEN, YELLOW and RED have been defined.
GFX_GOL_MeterScaleColorSet(pMtr, WHITE, WHITE, WHITE,
GREEN, YELLOW, RED);
// use GOLDraw() to draw the meter created
while(!GOLDraw());
Parameters
Parameters Description
ID Unique user defined ID for the object instance.
left Left most position of the object.
top Top most position of the object.
right Right most position of the object.
bottom Bottom most position of the object.
state Sets the initial state of the object.
type Specifies the type of Meter to be drawn (see
GFX_GOL_METER_TYPE).
value Initial value set to the meter.
minValue The minimum value the meter will display.
maxValue The maximum value the meter will display.
pTitleFont Pointer to the font used for the Title.
pValueFont Pointer to the font used for the value.
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
225

- 1
- 2
…
- 223
- 224
- 225
- 226
- 227
…
- 373
- 374