Vault 7: Projects

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

Parameters
Parameters Description
x2 x coordinate of the line end point.
y2 y coordinate of the line end point.
Function
GFX_STATUS GFX_LineToDraw(
int16_t x2,
int16_t y2)
1.6.1.1.2.7 GFX_LineToRelativeDraw Function
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()).
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_LineToRelativeDraw(int16_t dX, int16_t dY);
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 current line cursor position (x,y) to (x+dX,y+dY) using the currently set line style set by
GFX_LineStyleSet(). The color used is the color set by the last call to GFX_ColorSet(). Note that the parameters dX and dY
are signed integers. This allows the line to be drawn from the line cursor to any direction.
If (x+dX) and/or (y+dY) results in a position that 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_LinePositionSet(100, 100);
GFX_LineToRelativeDraw( 0, -90);
GFX_LineToRelativeDraw(-90, 0);
GFX_LineToRelativeDraw( 90, 90);
GFX_LineToRelativeDraw(-90, 0);
GFX_LineToRelativeDraw( 90, -90);
GFX_LinePositionSet(10, 10);
GFX_LineToRelativeDraw( 0, 90);
Parameters
Parameters Description
dX the offset for the x starting position that will define the
x-coordinate of the end of the line.
dY the offset for the y starting position that will define the
y-coordinate of the end of the line.
Function
GFX_STATUS GFX_LineToRelativeDraw(
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
82

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh