# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 83
- 84
- 85
- 86
- 87
…
- 373
- 374

Syntax
GFX_STATUS GFX_RectangleDraw(uint16_t left, uint16_t top, uint16_t right, uint16_t bottom);
Returns
Status of the rectangle rendering. GFX_STATUS_SUCCESS - rectangle rendering done. GFX_STATUS_FAILURE -
rectangle rendering is not done.
Description
This function renders a rectangular shape using the given left, top, right and bottom parameters to define the shape
dimension. The shape is rendered using the currently set line style by GFX_LineStyleSet(). The color used is the color set by
the last call to GFX_ColorSet().
The rendering of this shape becomes undefined when any one of the following is true:
• Any of the following pixel locations left,top, right,bottom falls outside the frame buffer.
• Color is not set, before this function is called.
• right < left
• bottom < top
Preconditions
Color must be set by GFX_ColorSet(). Line style must be set by GFX_LineStyleSet().
Example
// draw a bright red rectangle
GFX_LineStyleSet(GFX_LINE_STYLE_THIN_SOLID);
GFX_ColorSet(BRIGHTRED);
GFX_RectangleDraw(30, 30, 88, 88, 15);
// draw a bright blue round rectangle
GFX_LineStyleSet(GFX_LINE_STYLE_THIN_DASHED);
GFX_ColorSet(BRIGHTBLUE);
GFX_RectangleRoundDraw(130, 30, 188, 88, 15);
Parameters
Parameters Description
left defines the left most pixel of the shape.
top defines the top most pixel of the shape.
right defines the right most pixel of the shape.
bottom defines the bottom most pixel of the shape.
Function
GFX_STATUS GFX_RectangleDraw(
uint16_t left,
uint16_t top,
uint16_t right,
uint16_t bottom)
1.6.1.1.3.4 GFX_RectangleRoundDraw Function
This function renders a rounded corner rectangular shape using the currently set line style and color.
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_RectangleRoundDraw(uint16_t left, uint16_t top, uint16_t right, uint16_t
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
85

- 1
- 2
…
- 83
- 84
- 85
- 86
- 87
…
- 373
- 374