ThorVG  v0.1
ThorVG is a platform-independent portable library for drawing vector-based scene and animation. It's an open-source software that is freely used by a variety of software platforms and applications. ThorVG provides neat and easy APIs, its library has no dependencies and keeps cheap and super compact size. It serves as the vector graphics engine for Tizen OS that powers many products.
GlCanvasfinal

A class for the rendering graphic elements with a GL raster engine. More...

Inheritance diagram for GlCanvas:

Public Member Functions

Result target (uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h) noexcept
 Sets the target buffer for the rasterization. More...
 
- Public Member Functions inherited from Canvas
Result reserve (uint32_t n) noexcept
 Sets the size of the container, where all the paints pushed into the Canvas are stored. More...
 
virtual Result push (std::unique_ptr< Paint > paint) noexcept
 Passes drawing elements to the Canvas using Paint objects. More...
 
virtual Result clear (bool free=true) noexcept
 Sets the total number of the paints pushed into the canvas to be zero. Depending on the value of the free argument, the paints are freed or not. More...
 
virtual Result update (Paint *paint) noexcept
 Request the canvas to update the paint objects. More...
 
virtual Result draw () noexcept
 Request the canvas to draw the Paint objects. More...
 
virtual Result sync () noexcept
 Guarantees that drawing task is finished. More...
 

Static Public Member Functions

static std::unique_ptr< GlCanvasgen () noexcept
 Creates a new GlCanvas object. More...
 

Detailed Description

A class for the rendering graphic elements with a GL raster engine.

Warning
Please do not use it. This class is not fully supported yet.

Member Function Documentation

◆ gen()

static std::unique_ptr<GlCanvas> gen ( )
staticnoexcept

Creates a new GlCanvas object.

Returns
A new GlCanvas object.

◆ target()

Result target ( uint32_t *  buffer,
uint32_t  stride,
uint32_t  w,
uint32_t  h 
)
noexcept

Sets the target buffer for the rasterization.

Warning
Please do not use it, this API is not official one. It could be modified in the next version.