This section contains APIs to create and draw graphics overlays for demos.
Data Structures | |
struct | app_grpx_init_prms_t |
Init parameters. More... | |
Functions | |
int32_t | appGrpxInit (app_grpx_init_prms_t *prm) |
Init graphics overlay. More... | |
void | appGrpxInitParamsInit (app_grpx_init_prms_t *prm, vx_context context) |
Set default parameters for init. More... | |
int32_t | appGrpxDeInit () |
Deinit graphics overlay. More... | |
int32_t | appGrpxGetDimCpuLoad (uint16_t *width, uint16_t *height) |
Get CPU load widget box dimensions. More... | |
int32_t | appGrpxShowCpuLoad (uint16_t startx, uint16_t starty) |
Show CPU load. More... | |
int32_t | appGrpxGetDimLogo (uint16_t *width, uint16_t *height) |
Get Logo widget box dimensions. More... | |
int32_t | appGrpxShowLogo (uint16_t startx, uint16_t starty) |
Show TI logo. More... | |
int32_t | appGrpxGetDimHwaLoad (uint16_t *width, uint16_t *height) |
Get VHWA load widget box dimensions. More... | |
int32_t | appGrpxShowHwaLoad (uint16_t startx, uint16_t starty) |
Show Vision HWA load. More... | |
int32_t | appGrpxGetDimDdrLoad (uint16_t *width, uint16_t *height) |
Get DDR load widget box dimensions. More... | |
int32_t | appGrpxShowDdrLoad (uint16_t startx, uint16_t starty) |
Show DDR load. More... | |
void | appGrpxDrawDefault (Draw2D_Handle *draw2d_obj, Draw2D_BufInfo *draw2d_buf_info, uint32_t update_type) |
Draw default layout. More... | |
Typedefs | |
typedef void(* | app_grpx_draw_f) (Draw2D_Handle *handle, Draw2D_BufInfo *draw2dBufInfo, uint32_t update_type) |
User callback that is invoked every 'update_interval' msecs. More... | |
typedef void(* app_grpx_draw_f) (Draw2D_Handle *handle, Draw2D_BufInfo *draw2dBufInfo, uint32_t update_type) |
User callback that is invoked every 'update_interval' msecs.
Note, screen is cleared by before calling this API in case update_type is 'Full update'
[in] | draw2dObj | Draw2D library handle, user can use this handle to draw text, bitmaps on the screen |
[in] | draw2dBufInfo | Buffer information into which the drawing happens |
[in] | update_type | 0: Full update, i.e draw all content, 1: partial update, only draw content updated from last invocation |
int32_t appGrpxInit | ( | app_grpx_init_prms_t * | prm | ) |
Init graphics overlay.
This also statrts showing the graphics overlay on the screen
[in] | prm | Init parameters |
void appGrpxInitParamsInit | ( | app_grpx_init_prms_t * | prm, |
vx_context | context | ||
) |
Set default parameters for init.
Recommend to call this before calling appGrpxInit() to set defaults and then override the parameters based on use-case.
int32_t appGrpxDeInit | ( | ) |
Deinit graphics overlay.
This also stops showing the graphics overlay on the screen Make sure OpenVX context is deleted only after this is called.
int32_t appGrpxGetDimCpuLoad | ( | uint16_t * | width, |
uint16_t * | height | ||
) |
Get CPU load widget box dimensions.
[out] | width | Width of the generated graphics, can be used by user to position the graphics |
[out] | height | Height of the generated graphics, can be used by user to position the graphics |
int32_t appGrpxShowCpuLoad | ( | uint16_t | startx, |
uint16_t | starty | ||
) |
Show CPU load.
Utility API to get and draw CPU load on the graphics overlay.
This API is provided as a convinience so that all users can use this and not have to contruct the CPU load graphics in their own way. This API can be called in the draw callback function registered during init.
[in] | startx | Position of the graphics |
[in] | starty | Position of the graphics |
int32_t appGrpxGetDimLogo | ( | uint16_t * | width, |
uint16_t * | height | ||
) |
Get Logo widget box dimensions.
[out] | width | Width of the generated graphics, can be used by user to position the graphics |
[out] | height | Height of the generated graphics, can be used by user to position the graphics |
int32_t appGrpxShowLogo | ( | uint16_t | startx, |
uint16_t | starty | ||
) |
Show TI logo.
Utility API to draw TI logo on the graphics overlay.
Other constraints and paramters same as appGrpxShowLogo()
int32_t appGrpxGetDimHwaLoad | ( | uint16_t * | width, |
uint16_t * | height | ||
) |
Get VHWA load widget box dimensions.
[out] | width | Width of the generated graphics, can be used by user to position the graphics |
[out] | height | Height of the generated graphics, can be used by user to position the graphics |
int32_t appGrpxShowHwaLoad | ( | uint16_t | startx, |
uint16_t | starty | ||
) |
Show Vision HWA load.
Utility API to get and draw Vision HWA load on the graphics overlay.
Other constraints and paramters same as appGrpxShowLogo()
int32_t appGrpxGetDimDdrLoad | ( | uint16_t * | width, |
uint16_t * | height | ||
) |
Get DDR load widget box dimensions.
[out] | width | Width of the generated graphics, can be used by user to position the graphics |
[out] | height | Height of the generated graphics, can be used by user to position the graphics |
int32_t appGrpxShowDdrLoad | ( | uint16_t | startx, |
uint16_t | starty | ||
) |
Show DDR load.
Utility API to get and draw DDR load on the graphics overlay.
Other constraints and paramters same as appGrpxShowLogo()
void appGrpxDrawDefault | ( | Draw2D_Handle * | draw2d_obj, |
Draw2D_BufInfo * | draw2d_buf_info, | ||
uint32_t | update_type | ||
) |
Draw default layout.
Utility API to draw basic layout of TI logo, CPU, HWA, DDR loads
Other constraints and paramters same as app_grpx_draw_f()