GfxFuncs

Overview

Related Modules:

Display

Description:

Defines pointers to the hardware acceleration driver functions.

Summary

Data Fields

Variable Name

Description

InitGfx )(void)

int32_t( 

Initializes hardware acceleration.

DeinitGfx )(void)

int32_t( 

Deinitializes hardware acceleration.

FillRect )(ISurfacesurface, IRectrect, uint32_t color, GfxOptopt)

int32_t( 

Fills a rectangle with a given color on the canvas.

DrawRectangle )(ISurfacesurface, Rectanglerect, uint32_t color, GfxOptopt)

int32_t( 

Draws a rectangle with a given color on the canvas.

DrawLine )(ISurfacesurface, ILineline, GfxOptopt)

int32_t( 

Draws a straight line with a given color on the canvas.

DrawCircle )(ISurfacesurface, ICirclecircle, GfxOptopt)

int32_t( 

Draws a circle with a specified center and radius on the canvas using a given color.

Blit )(ISurfacesrcSurface, IRectsrcRect, ISurfacedstSurface, IRectdstRect)

int32_t( 

Blits bitmaps.

Sync )(void)

int32_t( 

Synchronizes hardware acceleration.

Details

Field Documentation

Blit

  1. int32_t(*GfxFuncs::Blit)([ISurface]($api-api-SmartVision-Devices-ISurface.md)*srcSurface,[IRect]($api-api-SmartVision-Devices-IRect.md)*srcRect,[ISurface]($api-api-SmartVision-Devices-ISurface.md)*dstSurface,[IRect]($api-api-SmartVision-Devices-IRect.md)*dstRect)

Description:

Blits bitmaps.

During bit blit, color space conversion (CSC), scaling, and rotation can be implemented.

Parameters:

Name

Description

srcSurfaceIndicates the pointer to the source bitmap.
srcRectIndicates the pointer to the rectangle of the source bitmap.
dstSurfaceIndicates the pointer to the destination bitmap.
dstRectIndicates the pointer to the rectangle of the destination bitmap.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

See also:

Blit3

DeinitGfx

  1. int32_t(*GfxFuncs::DeinitGfx)(void)

Description:

Deinitializes hardware acceleration.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

See also:

InitGfx

DrawCircle

  1. int32_t(*GfxFuncs::DrawCircle)([ISurface]($api-api-SmartVision-Devices-ISurface.md)*surface,[ICircle]($api-api-SmartVision-Devices-ICircle.md)*circle,[GfxOpt]($api-api-SmartVision-Devices-GfxOpt.md)*opt)

Description:

Draws a circle with a specified center and radius on the canvas using a given color.

Parameters:

Name

Description

surfaceIndicates the pointer to the canvas.
circleIndicates the pointer to the circle to draw.
optIndicates the pointer to the hardware acceleration option.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

DrawLine

  1. int32_t(*GfxFuncs::DrawLine)([ISurface]($api-api-SmartVision-Devices-ISurface.md)*surface,[ILine]($api-api-SmartVision-Devices-ILine.md)*line,[GfxOpt]($api-api-SmartVision-Devices-GfxOpt.md)*opt)

Description:

Draws a straight line with a given color on the canvas.

Parameters:

Name

Description

surfaceIndicates the pointer to the canvas.
lineIndicates the pointer to the line to draw.
optIndicates the pointer to the hardware acceleration option.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

DrawRectangle

  1. int32_t(*GfxFuncs::DrawRectangle)([ISurface]($api-api-SmartVision-Devices-ISurface.md)*surface,[Rectangle]($api-api-SmartVision-Devices-Rectangle.md)*rect,uint32_t color,[GfxOpt]($api-api-SmartVision-Devices-GfxOpt.md)*opt)

Description:

Draws a rectangle with a given color on the canvas.

Parameters:

Name

Description

surfaceIndicates the pointer to the canvas.
rectIndicates the pointer to the rectangle to draw.
colorIndicates the color to draw.
optIndicates the pointer to the hardware acceleration option.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

See also:

FillRect

FillRect

  1. int32_t(*GfxFuncs::FillRect)([ISurface]($api-api-SmartVision-Devices-ISurface.md)*surface,[IRect]($api-api-SmartVision-Devices-IRect.md)*rect,uint32_t color,[GfxOpt]($api-api-SmartVision-Devices-GfxOpt.md)*opt)

Description:

Fills a rectangle with a given color on the canvas.

Parameters:

Name

Description

surfaceIndicates the pointer to the canvas.
rectIndicates the pointer to the rectangle to fill.
colorIndicates the color to fill.
optIndicates the pointer to the hardware acceleration option.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

InitGfx

  1. int32_t(*GfxFuncs::InitGfx)(void)

Description:

Initializes hardware acceleration.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.

See also:

DeinitGfx

Sync

  1. int32_t(*GfxFuncs::Sync)(void)

Description:

Synchronizes hardware acceleration.

Use this function for hardware acceleration synchronization when hardware acceleration is used to draw and blit bitmaps. This function blocks the process until hardware acceleration is complete.

Parameters:

Name

Description

timeOutIndicates the timeout duration for hardware acceleration synchronization. The value 0 indicates no timeout, so the process waits until hardware acceleration is complete.

Returns:

Returns 0 if the operation is successful; returns an error code defined in DispErrCode otherwise.