# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 309
- 310
- 311
- 312
- 313
…
- 373
- 374

1.6.2.4.4 GFX_GOL_ObjectDrawEnable Function
This function sets the object to be redraw.
File
gfx_gol.h
Syntax
void GFX_GOL_ObjectDrawEnable(GFX_GOL_OBJ_HEADER * pObject);
Returns
None.
Description
This function sets the object to be redrawn. For the redraw to be effective, the object must be in the current active list. If not,
the redraw action will not be performed until the list where the object is currently inserted will be set as the active list.
Preconditions
None.
Example
void GOLRedrawRec(uint16_t left, uint16_t top,
uint16_t right, uint16_t bottom)
{
GFX_GOL_OBJ_HEADER *pCurrentObj;
int overlapX, overlapY;
pCurrentObj = _pGolObjects;
while(pCurrentObj != NULL)
{
overlapX = overlapY = 0;
// check overlaps in x direction
if (((pCurrentObj->left <= left) && (pCurrentObj->right >= left)) ||
((pCurrentObj->left <= right) && (pCurrentObj->right >= right)) ||
((pCurrentObj->left <= left) && (pCurrentObj->right >= right)) ||
((pCurrentObj->left >= left) && (pCurrentObj->right <= right))
)
overlapX = 1;
// check overlaps in y direction
if (((pCurrentObj->top <= top) && (pCurrentObj->bottom >= top)) ||
((pCurrentObj->top <= bottom) && (pCurrentObj->bottom >= bottom)) ||
((pCurrentObj->top <= top) && (pCurrentObj->bottom >= bottom)) ||
((pCurrentObj->top >= top) && (pCurrentObj->bottom <= bottom))
)
overlapY = 1;
// when any portion of the widget is touched by the defined rectangle the
// x and y overlaps will exist.
if (overlapX & overlapY) {
GFX_GOL_ObjectRedraw(pCurrentObj);
}
pCurrentObj = (GFX_GOL_OBJ_HEADER *)pCurrentObj->pNxtObj;
} //end of while
}
Parameters
Parameters Description
pObject pointer to the object that will be redrawn.
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
311

- 1
- 2
…
- 309
- 310
- 311
- 312
- 313
…
- 373
- 374