Vault 7: Projects
This publication series is about specific projects related to the Vault 7 main publication.
bottom, uint16_t radius);
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 with rounded corner using the given left, top, right, bottom and radius parameters
to define the shape dimension. radius defines the rounded corner shape. 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().
Left most pixel location is defined by left - radius. Top most pixel location is defined by top - radius. Right most pixel location
is defined by right + radius. Bottom most pixel location is defined by bottom + radius. When radius = 0, there are no rounded
corners. In this case (left,top) will define the left, top corner and (right,bottom) will define the right, bottom corner of the shape.
When left = right and top = bottom, with radius > 0, a circular object is drawn. When left < right and top < bottom and radius
= 0, a rectangular object is drawn.
The rendering of this shape becomes undefined when any one of the following is true:
• Any of the following pixel locations left-rad , top-rad, right+rad, bottom+rad 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);
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
86
Protego_Release_01_05-Related-OEM-Documentation-MLA_v2013_12_20-help_mla_gfx.pdf