# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 76
- 77
- 78
- 79
- 80
…
- 373
- 374

GFX_LineToDraw This function renders a line from current line cursor position (x,y) to
(x2,y2) using the currently set line style (see GFX_LineStyleSet()).
GFX_LineToRelativeDraw This function renders a line from current line cursor position (x,y) to
(x+dX,y+dY) using the currently set line style (see GFX_LineStyleSet()).
1.6.1.1.2.1 GFX_LineDraw Function
This function renders a line from x1,y1 to x2,y2 using the currently set line style (see GFX_LineStyleSet()).
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_LineDraw(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2);
Returns
Status of the line rendering. GFX_STATUS_SUCCESS - line rendering done. GFX_STATUS_FAILURE - line rendering is
not done.
Description
This function renders a line from x1,y1 to x2,y2 using the currently set line style set by GFX_LineStyleSet(). The color used
is the color set by the last call to GFX_ColorSet().
If x1,y1 and/or x2,y2 is not on the frame buffer, then the behavior is undefined. If color is not set, before this function is
called, the output is undefined.
Preconditions
Color must be set by GFX_ColorSet(). Line style must be set by GFX_LineStyleSet().
Example
GFX_ColorSet(BRIGHTRED);
GFX_LineStyleSet(GFX_LINE_STYLE_THIN_DOTTED);
GFX_LineDraw(10, 10,100, 10);
Parameters
Parameters Description
x1 x coordinate of the line start point.
y1 y coordinate of the line start point.
x2 x coordinate of the line end point.
y2 y coordinate of the line end point.
Function
GFX_STATUS GFX_LineDraw(
uint16_t x1,
uint16_t y1,
uint16_t x2,
uint16_t y2)
1.6.1.1.2.2 GFX_LinePositionRelativeSet Function
This function sets the line cursor to a new position relative to the current position.
File
gfx_primitive.h
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
78

- 1
- 2
…
- 76
- 77
- 78
- 79
- 80
…
- 373
- 374