# Vault 7: Projects

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

### Protego

# MLA -- Graphics Library

- 1
- 2
…
- 234
- 235
- 236
- 237
- 238
…
- 373
- 374

Parameters
Parameters Description
pObject Pointer to the object.
Function
GFX_STATUS GFX_GOL_PictureControlDraw(void *pObject)
1.6.2.1.8.6 GFX_GOL_PictureControlPartialSet Function
This function sets the partial image parameters to be in the object.
File
gfx_gol_picture.h
Syntax
void GFX_GOL_PictureControlPartialSet(GFX_GOL_PICTURECONTROL * pObject, uint16_t xOffset,
uint16_t yOffset, uint16_t partialWidth, uint16_t partialHeight);
Returns
None.
Description
This function sets the partial image parameters to be used in the object. This function allows usage of the object to specify a
rectangular area of an image to be drawn as part of the object. This is useful when an image is already included in a larger
image. To save memory, a separate image is not necessary for the picture object. The location of the smaller image in the
larger image can be specified to show up in the picture object.
This function will result in an undefined behavior when one of the following is true:
• xOffset - value must not be greater than the image width.
• yOffset - value must not be greater than the image height.
• partialWidth - value must not be greater than image width - xoffset + 1. Value must also be less than the actual image
width.
• partialHeight - value must not be greater than image height - yoffset + 1. Value must also be less than the actual image
height.
Preconditions
Object must exist in memory. The image pointer of the object must be initialized properly.
Example
// assume pLargeImage is a valid GFX_RESOURCE_HDR
// assume BigImage has a height and width of 100 pixels.
GFX_RESOURCE_HDR *pLargeImage = &BigImage;
GFX_GOL_PICTURECONTROL *pPicture;
uint16_t width, height;
uint16_t xOffset, yOffset;
uint16_t objectWidth, objectHeight;
objectWidth = 60 - 50; // 10 pixels
objectHeight = 120 - 90; // 30 pixels
// -1 is needed since the object dimension is inclusive
pPicture = GFX_GOL_PictureControlCreate(
10,
50, 90,
50 + objectWidth - 1,
90 + objectHeight - 1,
GFX_GOL_PICTURECONTROL_DRAW_STATE,
largeImage,
NULL);
1.6 Library Interface MLA - Graphics Library Help Graphics Object Layer
236

- 1
- 2
…
- 234
- 235
- 236
- 237
- 238
…
- 373
- 374