# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 86
- 87
- 88
- 89
- 90
…
- 373
- 374

• solid color - when the fill style is set to GFX_FILL_STYLE_COLOR
• alpha blended fill - when the fill style is set to GFX_FILL_STYLE_ALPHA_COLOR.
Any other selected fill style will be ignored and will assume a solid color fill will be used. The parameters left, top, right
bottom will define the shape dimension.
When fill style is set to GFX_FILL_STYLE_ALPHA_COLOR, the bar can also be rendered with an option to select the type
of background. GFX_BACKGROUND_NONE - the bar will be rendered with no alpha blending.
GFX_BACKGROUND_COLOR - the bar will be alpha blended with the currently set background color.
GFX_BACKGROUND_IMAGE - the bar will be alpha blended with the currently set background image.
GFX_BACKGROUND_DISPLAY_BUFFER - the bar will be alpha blended with the current contents of the frame buffer.
The background type is set by the GFX_BackgroundTypeSet().
The rendering of this shape becomes undefined when any one of the following is true:
• Any of the following pixel locations left,top or right,bottom falls outside the frame buffer.
• Colors are not set before this function is called.
• When right < left
• When bottom < top
• When pixel locations defined by left, top and/or right, bottom are not on the frame buffer.
Preconditions
Fill style must be set by GFX_FillStyleSet() when alpha blended fill is desired. Color must be set by GFX_ColorSet().
Example
// assume RED is a macro that define GFX_COLOR types
GFX_STATUS status;
// assume BackGroundImage is a valid image already draw
// on the screen
GFX_RESOURCE_HDR *pMyBackgroundImage = &BackGroundImage;
// render a RED bar
GFX_FillStyleSet(GFX_FILL_STYLE_COLOR);
GFX_ColorSet(RED);
status = GFX_BarDraw(10, 110, 100, 200);
// render an alpha blended bar with
// the current contents of the frame buffer
GFX_FillStyleSet(GFX_FILL_STYLE_ALPHA_COLOR);
GFX_BackgroundTypeSet(GFX_BACKGROUND_DISPLAY_BUFFER);
GFX_ColorSet(RED);
status = GFX_BarDraw(10, 110, 100, 200);
// render an alpha blended bar with a background image
GFX_FillStyleSet(GFX_FILL_STYLE_ALPHA_COLOR);
// color value here has no effect since the background set
// is type GFX_BACKGROUND_IMAGE
GFX_BackgroundSet(0, 0, pMyBackGroundImage, 0);
GFX_BackgroundTypeSet(GFX_BACKGROUND_IMAGE);
GFX_ColorSet(RED);
status = GFX_BarDraw(10, 110, 100, 200);
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_BarDraw(
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
88

- 1
- 2
…
- 86
- 87
- 88
- 89
- 90
…
- 373
- 374