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.
|
A module for rendering the graphical elements using the software engine. More...
![]() |
Functions | |
TVG_EXPORT Tvg_Canvas * | tvg_swcanvas_create () |
Creates a Canvas object. More... | |
TVG_EXPORT Tvg_Result | tvg_swcanvas_set_target (Tvg_Canvas *canvas, uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h, uint32_t cs) |
Sets the buffer used in the rasterization process and defines the used colorspace. More... | |
A module for rendering the graphical elements using the software engine.
TVG_EXPORT Tvg_Canvas* tvg_swcanvas_create | ( | ) |
Creates a Canvas object.
TVG_EXPORT Tvg_Result tvg_swcanvas_set_target | ( | Tvg_Canvas * | canvas, |
uint32_t * | buffer, | ||
uint32_t | stride, | ||
uint32_t | w, | ||
uint32_t | h, | ||
uint32_t | cs | ||
) |
Sets the buffer used in the rasterization process and defines the used colorspace.
For optimisation reasons TVG does not allocate memory for the output buffer on its own. The buffer of a desirable size should be allocated and owned by the caller.
[in] | canvas | The Tvg_Canvas object managing the buffer . |
[in] | buffer | A pointer to the allocated memory block of the size stride x h . |
[in] | stride | The stride of the raster image - in most cases same value as w . |
[in] | w | The width of the raster image. |
[in] | h | The height of the raster image. |
[in] | cs | The colorspace value defining the way the 32-bits colors should be read/written.
|
TVG_RESULT_SUCCESS | Succeed. |
TVG_RESULT_MEMORY_CORRUPTION | Casting in the internal function implementation failed. |
TVG_RESULT_INVALID_ARGUMENTS | An invalid buffer pointer passed or one of the stride , w or h being zero. |
TVG_RESULT_NOT_SUPPORTED | The software engine is not supported. |