# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 107
- 108
- 109
- 110
- 111
…
- 373
- 374

1.6.1.1.7.2 GFX_AlphaBlendingValueSet Function
This function sets the alpha value for alpha blending rendering.
File
gfx_primitive.h
Syntax
GFX_STATUS GFX_AlphaBlendingValueSet(uint16_t alpha);
Returns
Status of the alpha value set action. Return GFX_STATUS_ERROR when the alpha value set is unsupported.
Description
This function sets the alpha value for alpha blending rendering. Accepted values are dependent on the used alpha blending
routines at build time. When using the software routines in the Primitive Layer, accepted values are 0, 25, 50, 75 and 100.
If using a specific implementation in the display driver used, implementation may support the full range (0-100). When this is
the case, refer to the driver alpha blending solution for details.
Function operation will ignore unsupported values of alpha.
Preconditions
None.
Example
// render a bar with no alpha blending
GFX_AlphaBlendingValueSet(100);
while(GFX_RectangleFillDraw(10,10,30,30) != GFX_STATUS_SUCCESS);
// render a bar with 50% alpha blending to a
// background with RED color
GFX_BackgroundSet(x, y, pBgImage, RED);
GFX_BackgroundTypeSet(GFX_BACKGROUND_COLOR);
GFX_AlphaBlendingValueSet(50);
while(GFX_RectangleFillDraw(10,40,30,60) != GFX_STATUS_SUCCESS);
Parameters
Parameters Description
alpha Defines the alpha blending percentage to be used for alpha
blending routines. Accepted values are dependent on the
alpha blending routines used. For Primitive Layer
implementation accepted values are
• 100 : no alpha blending, last color set by
GFX_ColorSet() will replace the pixels.
• 75 : 75% of the last color set by GFX_ColorSet() will be
alpha blended to the existing pixel.
• 50 : 50% of the last color set by GFX_ColorSet() will be
alpha blended to the existing pixel.
• 25 : 25% of the last color set by GFX_ColorSet() will be
alpha blended to the existing pixel.
• 0 : 0% of the last color set by GFX_ColorSet() will be
alpha blended to the existing pixel. This means the
existing pixel color will not change.
Function
GFX_STATUS GFX_AlphaBlendingValueSet(uint16_t alpha)
1.6 Library Interface MLA - Graphics Library Help Graphics Primitive Layer
109

- 1
- 2
…
- 107
- 108
- 109
- 110
- 111
…
- 373
- 374