Vision Apps User Guide
Graphics overlay utility APIs

Introduction

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 Documentation

◆ app_grpx_draw_f

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'

Parameters
[in]draw2dObjDraw2D library handle, user can use this handle to draw text, bitmaps on the screen
[in]draw2dBufInfoBuffer information into which the drawing happens
[in]update_type0: Full update, i.e draw all content, 1: partial update, only draw content updated from last invocation

Function Documentation

◆ appGrpxInit()

int32_t appGrpxInit ( app_grpx_init_prms_t prm)

Init graphics overlay.

This also statrts showing the graphics overlay on the screen

Parameters
[in]prmInit parameters

◆ appGrpxInitParamsInit()

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.

◆ appGrpxDeInit()

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.

◆ appGrpxGetDimCpuLoad()

int32_t appGrpxGetDimCpuLoad ( uint16_t *  width,
uint16_t *  height 
)

Get CPU load widget box dimensions.

Parameters
[out]widthWidth of the generated graphics, can be used by user to position the graphics
[out]heightHeight of the generated graphics, can be used by user to position the graphics

◆ appGrpxShowCpuLoad()

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.
Parameters
[in]startxPosition of the graphics
[in]startyPosition of the graphics

◆ appGrpxGetDimLogo()

int32_t appGrpxGetDimLogo ( uint16_t *  width,
uint16_t *  height 
)

Get Logo widget box dimensions.

Parameters
[out]widthWidth of the generated graphics, can be used by user to position the graphics
[out]heightHeight of the generated graphics, can be used by user to position the graphics

◆ appGrpxShowLogo()

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()

◆ appGrpxGetDimHwaLoad()

int32_t appGrpxGetDimHwaLoad ( uint16_t *  width,
uint16_t *  height 
)

Get VHWA load widget box dimensions.

Parameters
[out]widthWidth of the generated graphics, can be used by user to position the graphics
[out]heightHeight of the generated graphics, can be used by user to position the graphics

◆ appGrpxShowHwaLoad()

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()

◆ appGrpxGetDimDdrLoad()

int32_t appGrpxGetDimDdrLoad ( uint16_t *  width,
uint16_t *  height 
)

Get DDR load widget box dimensions.

Parameters
[out]widthWidth of the generated graphics, can be used by user to position the graphics
[out]heightHeight of the generated graphics, can be used by user to position the graphics

◆ appGrpxShowDdrLoad()

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()

◆ appGrpxDrawDefault()

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()