diff --git a/docs/Doxyfile b/docs/Doxyfile
index 9f2892a5..2ff8f794 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -51,7 +51,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
-PROJECT_LOGO = /home/hermet/Projects/thorvg/docs/small_logo.svg
+PROJECT_LOGO = small_logo.svg
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
diff --git a/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html b/docs/html/dir_8af83c0dc83a45a35ca6968cdc29a7af.html
similarity index 81%
rename from docs/html/dir_bfccd401955b95cf8c75461437045ac0.html
rename to docs/html/dir_8af83c0dc83a45a35ca6968cdc29a7af.html
index a57ba2cc..5f5bfdc8 100644
--- a/docs/html/dir_bfccd401955b95cf8c75461437045ac0.html
+++ b/docs/html/dir_8af83c0dc83a45a35ca6968cdc29a7af.html
@@ -5,7 +5,7 @@
-
ThorVG: /home/hermet/Projects/thorvg/inc Directory Reference
+ThorVG: tmp Directory Reference
@@ -64,12 +64,12 @@ $(function() {
@@ -77,6 +77,9 @@ $(function() {
Files
file thorvg.h [code]
+file thorvg_capi.h [code]
+ The module provides C bindings for the ThorVG library. Please refer to src/examples/Capi.cpp to find the thorvg_capi usage examples.
+
diff --git a/docs/html/group__ThorVGCapi__Canvas.html b/docs/html/group__ThorVGCapi__Canvas.html
new file mode 100644
index 00000000..fe22d394
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Canvas.html
@@ -0,0 +1,592 @@
+
+
+
+
+
+
+
+ThorVG: Canvas
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module for managing and drawing graphical elements.
+More...
+
+
+
+
+ SwCanvas
+ A module for rendering the graphical elements using the software engine.
+
+
+
+
A module for managing and drawing graphical elements.
+
A canvas is an entity responsible for drawing the target. It sets up the drawing engine and the buffer, which can be drawn on the screen. It also manages given Paint objects.
+
Note A Canvas behavior depends on the raster engine though the final content of the buffer is expected to be identical.
+
Warning The Paint objects belonging to one Canvas can't be shared among multiple Canvases.
+
+
+
◆ tvg_canvas_clear()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_canvas_clear
+ (
+ Tvg_Canvas *
+ canvas ,
+
+
+
+
+ bool
+ free
+
+
+
+ )
+
+
+
+
+
+
Sets the total number of the paints pushed into the canvas to be zero. Tvg_Paint objects stored in the canvas are released if free
is set to true
, otherwise the memory is not deallocated and all paints should be released manually in order to avoid memory leaks.
+
Parameters
+
+ [in] canvas The Tvg_Canvas object to be cleared.
+ [in] free If true
the memory occupied by paints is deallocated, otherwise it is not.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
Warning Please use the free
argument only when you know how it works, otherwise it's not recommended.
+
See also tvg_canvas_destroy()
+
+
+
+
+
◆ tvg_canvas_destroy()
+
+
+
+
+
Clears the canvas internal data, releases all paints stored by the canvas and destroys the canvas object itself.
+
+
static uint32_t *buffer = NULL;
+
+
static void _init() {
+
+
buffer = (uint32_t*) malloc(sizeof (uint32_t) * 100 * 100);
+
+
}
+
+
+
static void _job(const int cmd) {
+
+
switch (cmd) {
+
case CMD_EXIT: return 0;
+
case CMD_ADD_RECT:
+
+
break ;
+
case CMD_DEL_RECT:
+
+
+
break ;
+
default :
+
break ;
+
}
+
}
+
+
int main(int argc, char **argv) {
+
int cmd = 0;
+
int stop = 1;
+
+
+
+
while (stop) {
+
+
stop = _job(cmd);
+
}
+
+
+
+
return 0;
+
}
+
+
+
+
Parameters
+
+ [in] canvas The Tvg_Canvas object to be destroyed.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer to the Tvg_Canvas object is passed.
+
+
+
+
Note If the paints from the canvas should not be released, the tvg_canvas_clear() with a free
argument value set to false
should be called. Please be aware that in such a case TVG is not responsible for the paints release anymore and it has to be done manually in order to avoid memory leaks.
+
See also tvg_paint_del() , tvg_canvas_clear()
+
+
+
+
+
◆ tvg_canvas_draw()
+
+
+
+
+
Requests the canvas to draw the Tvg_Paint objects.
+
All paints from the given canvas will be rasterized to the buffer.
+
Parameters
+
+ [in] canvas The Tvg_Canvas object containing elements to be drawn.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
Note Drawing can be asynchronous based on the assigned thread number. To guarantee the drawing is done, call tvg_canvas_sync() afterwards.
+
See also tvg_canvas_sync()
+
+
+
+
+
◆ tvg_canvas_push()
+
+
+
+
+
Inserts a drawing element into the canvas using a Tvg_Paint object.
+
Parameters
+
+ [in] canvas The Tvg_Canvas object managing the paint
.
+ [in] paint The Tvg_Paint object to be drawn.
+
+
+
+
Only the paints pushed into the canvas will be drawing targets. They are retained by the canvas until you call tvg_canvas_clear() . If you know the number of the pushed objects in advance, please call tvg_canvas_reserve() .
+
Returns Tvg_Result return values:
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT In case a nullptr
is passed as the argument.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
Note The rendering order of the paints is the same as the order as they were pushed. Consider sorting the paints before pushing them if you intend to use layering.
+
See also tvg_canvas_reserve() , tvg_canvas_clear()
+
+
+
+
+
◆ tvg_canvas_reserve()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_canvas_reserve
+ (
+ Tvg_Canvas *
+ canvas ,
+
+
+
+
+ uint32_t
+ n
+
+
+
+ )
+
+
+
+
+
+
Reserves a memory block where the objects pushed into a canvas are stored.
+
If the number of Tvg_Paints to be stored in a canvas is known in advance, calling this function reduces the multiple memory allocations thus improves the performance.
+
+
+
+
+
+
uint32_t *buffer = NULL;
+
buffer = (uint32_t*) malloc(sizeof (uint32_t) * 100 * 100);
+
if (!buffer) return ;
+
+
+
+
+
+
+
Parameters
+
+ [in] canvas The Tvg_Canvas object managing the reserved memory.
+ [in] n The number of objects for which the memory is to be reserved.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_canvas_sync()
+
+
+
+
+
Guarantees that the drawing process is finished.
+
Since the canvas rendering can be performed asynchronously, it should be called after the tvg_canvas_draw() .
+
Parameters
+
+ [in] canvas The Tvg_Canvas object containing elements which were drawn.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
See also tvg_canvas_draw()
+
+
+
+
+
◆ tvg_canvas_update()
+
+
+
+
+
Updates all paints in a canvas.
+
Should be called before drawing in order to prepare paints for the rendering.
+
+
+
+
+
+
int _frame_render(void ) {
+
+
+
+
}
+
+
+
void _event_handler(event *event_data) {
+
if (!event_data) return NULL;
+
switch (event_data.type) {
+
case EVENT_RECT_ADD:
+
if (!rect) {
+
+
+
+
+
}
+
break ;
+
case EVENT_RECT_MOVE:
+
+
break ;
+
default :
+
break ;
+
}
+
}
+
+
int main(int argc, char **argv) {
+
+
event_handler_add(handler, _event_handler);
+
+
+
app_loop_begin(_frame_render);
+
app_loop_finish();
+
cleanup();
+
}
+
Parameters
+
+ [in] canvas The Tvg_Canvas object to be updated.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
See also tvg_canvas_update_paint()
+
+
+
+
+
◆ tvg_canvas_update_paint()
+
+
+
+
+
Updates the given Tvg_Paint object from the canvas before the rendering.
+
If a client application using the TVG library does not update the entire canvas with tvg_canvas_update() in the frame rendering process, Tvg_Paint objects previously added to the canvas should be updated manually with this function.
+
Parameters
+
+ [in] canvas The Tvg_Canvas object to which the paint
belongs.
+ [in] paint The Tvg_Paint object to be updated.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT In case a nullptr
is passed as the argument.
+
+
+
+
See also tvg_canvas_update()
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_shape_append_rect(Tvg_Paint *paint, float x, float y, float w, float h, float rx, float ry)
Appends a rectangle to the path.
+TVG_EXPORT Tvg_Result tvg_canvas_push(Tvg_Canvas *canvas, Tvg_Paint *paint)
Inserts a drawing element into the canvas using a Tvg_Paint object.
+TVG_EXPORT Tvg_Result tvg_swcanvas_set_target(Tvg_Canvas *canvas, uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h, Tvg_Colorspace cs)
Sets the buffer used in the rasterization process and defines the used colorspace.
+TVG_EXPORT Tvg_Result tvg_canvas_sync(Tvg_Canvas *canvas)
Guarantees that the drawing process is finished.
+TVG_EXPORT Tvg_Result tvg_canvas_clear(Tvg_Canvas *canvas, bool free)
Sets the total number of the paints pushed into the canvas to be zero. Tvg_Paint objects stored in th...
+@ TVG_ENGINE_SW
CPU rasterizer.
Definition: thorvg_capi.h:84
+TVG_EXPORT Tvg_Result tvg_paint_del(Tvg_Paint *paint)
Releases the given Tvg_Paint object.
+struct _Tvg_Canvas Tvg_Canvas
A structure responsible for managing and drawing graphical elements.
Definition: thorvg_capi.h:55
+TVG_EXPORT Tvg_Result tvg_canvas_update(Tvg_Canvas *canvas)
Updates all paints in a canvas.
+TVG_EXPORT Tvg_Result tvg_canvas_draw(Tvg_Canvas *canvas)
Requests the canvas to draw the Tvg_Paint objects.
+TVG_EXPORT Tvg_Result tvg_paint_translate(Tvg_Paint *paint, float x, float y)
Moves the given Tvg_Paint in a two-dimensional space.
+TVG_EXPORT Tvg_Canvas * tvg_swcanvas_create()
Creates a Canvas object.
+TVG_EXPORT Tvg_Result tvg_engine_init(Tvg_Engine engine_method, unsigned threads)
Initializes TVG engines.
+@ TVG_COLORSPACE_ARGB8888
The 8-bit color channels are combined into 32-bit color in the order: alpha, red, green,...
Definition: thorvg_capi.h:332
+struct _Tvg_Paint Tvg_Paint
A structure representing a graphical element.
Definition: thorvg_capi.h:63
+TVG_EXPORT Tvg_Result tvg_canvas_destroy(Tvg_Canvas *canvas)
Clears the canvas internal data, releases all paints stored by the canvas and destroys the canvas obj...
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_width(Tvg_Paint *paint, float width)
Sets the stroke width for all of the figures from the paint.
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_color(Tvg_Paint *paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Sets the shape's stroke color.
+TVG_EXPORT Tvg_Result tvg_engine_term(Tvg_Engine engine_method)
Terminates TVG engines.
+TVG_EXPORT Tvg_Result tvg_canvas_reserve(Tvg_Canvas *canvas, uint32_t n)
Reserves a memory block where the objects pushed into a canvas are stored.
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Canvas.map b/docs/html/group__ThorVGCapi__Canvas.map
new file mode 100644
index 00000000..4e8ee5d4
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Canvas.map
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Canvas.md5 b/docs/html/group__ThorVGCapi__Canvas.md5
new file mode 100644
index 00000000..571b4dd7
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Canvas.md5
@@ -0,0 +1 @@
+2e453c06c8f1182a1a0f31e1920ddb6b
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Canvas.png b/docs/html/group__ThorVGCapi__Canvas.png
new file mode 100644
index 00000000..3edb21a8
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Canvas.png differ
diff --git a/docs/html/group__ThorVGCapi__Gradient.html b/docs/html/group__ThorVGCapi__Gradient.html
new file mode 100644
index 00000000..82d4a806
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Gradient.html
@@ -0,0 +1,828 @@
+
+
+
+
+
+
+
+ThorVG: Gradient
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module managing the gradient fill of objects.
+More...
+
+
+
+
+struct Tvg_Color_Stop
+ A data structure storing the information about the color and its relative position inside the gradient bounds. More...
+
+
+
+TVG_EXPORT Tvg_Gradient * tvg_linear_gradient_new ()
+ Creates a new linear gradient object. More...
+
+TVG_EXPORT Tvg_Gradient * tvg_radial_gradient_new ()
+ Creates a new radial gradient object. More...
+
+TVG_EXPORT Tvg_Result tvg_linear_gradient_set (Tvg_Gradient *grad, float x1, float y1, float x2, float y2)
+ Sets the linear gradient bounds. More...
+
+TVG_EXPORT Tvg_Result tvg_linear_gradient_get (Tvg_Gradient *grad, float *x1, float *y1, float *x2, float *y2)
+ Gets the linear gradient bounds. More...
+
+TVG_EXPORT Tvg_Result tvg_radial_gradient_set (Tvg_Gradient *grad, float cx, float cy, float radius)
+ Sets the radial gradient bounds. More...
+
+TVG_EXPORT Tvg_Result tvg_radial_gradient_get (Tvg_Gradient *grad, float *cx, float *cy, float *radius)
+ The function gets radial gradient center point ant radius. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_set_color_stops (Tvg_Gradient *grad, const Tvg_Color_Stop *color_stop, uint32_t cnt)
+ Sets the parameters of the colors of the gradient and their position. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_get_color_stops (const Tvg_Gradient *grad, const Tvg_Color_Stop **color_stop, uint32_t *cnt)
+ Gets the parameters of the colors of the gradient, their position and number. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_set_spread (Tvg_Gradient *grad, const Tvg_Stroke_Fill spread)
+ Sets the Tvg_Stroke_Fill value, which specifies how to fill the area outside the gradient bounds. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_get_spread (const Tvg_Gradient *grad, Tvg_Stroke_Fill *spread)
+ Gets the FillSpread value of the gradient object. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_set_transform (Tvg_Gradient *grad, const Tvg_Matrix *m)
+ Sets the matrix of the affine transformation for the gradient object. (BETA_API) More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_get_transform (const Tvg_Gradient *grad, Tvg_Matrix *m)
+ Gets the matrix of the affine transformation of the gradient object. (BETA_API) More...
+
+TVG_EXPORT Tvg_Gradient * tvg_gradient_duplicate (Tvg_Gradient *grad)
+ Duplicates the given Tvg_Gradient object. More...
+
+TVG_EXPORT Tvg_Result tvg_gradient_del (Tvg_Gradient *grad)
+ Deletes the given gradient object. More...
+
+
+
+
A module managing the gradient fill of objects.
+
The module enables to set and to get the gradient colors and their arrangement inside the gradient bounds, to specify the gradient bounds and the gradient behavior in case the area defined by the gradient bounds is smaller than the area to be filled.
+
+
+
◆ tvg_gradient_del()
+
+
+
+
+
Deletes the given gradient object.
+
Parameters
+
+ [in] grad The gradient object to be deleted.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
+
+
+
+
◆ tvg_gradient_duplicate()
+
+
+
+
+
Duplicates the given Tvg_Gradient object.
+
Creates a new object and sets its all properties as in the original object.
+
Parameters
+
+ [in] grad The Tvg_Gradient object to be copied.
+
+
+
+
Returns A copied Tvg_Gradient object if succeed, nullptr
otherwise.
+
+
+
+
+
◆ tvg_gradient_get_color_stops()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_gradient_get_color_stops
+ (
+ const Tvg_Gradient *
+ grad ,
+
+
+
+
+ const Tvg_Color_Stop **
+ color_stop ,
+
+
+
+
+ uint32_t *
+ cnt
+
+
+
+ )
+
+
+
+
+
+
Gets the parameters of the colors of the gradient, their position and number.
+
The function does not allocate any memory.
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which to get the color information.
+ [out] color_stop An array of Tvg_Color_Stop data structure.
+ [out] cnt The size of the color_stop
array equal to the colors number used in the gradient.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_gradient_get_spread()
+
+
+
+
+
Gets the FillSpread value of the gradient object.
+
Parameters
+
+ [in] grad The Tvg_Gradient object.
+ [out] spread The FillSpread value.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_gradient_get_transform()
+
+
+
+
+
Gets the matrix of the affine transformation of the gradient object. (BETA_API)
+
In case no transformation was applied, the identity matrix is set.
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which to get the transformation matrix.
+ [out] m The 3x3 augmented matrix.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
is passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_gradient_set_color_stops()
+
+
+
+
+
Sets the parameters of the colors of the gradient and their position.
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which the color information is to be set.
+ [in] color_stop An array of Tvg_Color_Stop data structure.
+ [in] cnt The size of the color_stop
array equal to the colors number used in the gradient.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
+
+
+
+
◆ tvg_gradient_set_spread()
+
+
+
+
+
Sets the Tvg_Stroke_Fill value, which specifies how to fill the area outside the gradient bounds.
+
Parameters
+
+ [in] grad The Tvg_Gradient object.
+ [in] spread The FillSpread value.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
+
+
+
+
◆ tvg_gradient_set_transform()
+
+
+
+
+
Sets the matrix of the affine transformation for the gradient object. (BETA_API)
+
The augmented matrix of the transformation is expected to be given.
+
Parameters
+
+ [in] grad The Tvg_Gradient object to be transformed.
+ [in] m The 3x3 augmented matrix.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
is passed as the argument.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_linear_gradient_get()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_linear_gradient_get
+ (
+ Tvg_Gradient *
+ grad ,
+
+
+
+
+ float *
+ x1 ,
+
+
+
+
+ float *
+ y1 ,
+
+
+
+
+ float *
+ x2 ,
+
+
+
+
+ float *
+ y2
+
+
+
+ )
+
+
+
+
+
+
Gets the linear gradient bounds.
+
The bounds of the linear gradient are defined as a surface constrained by two parallel lines crossing the given points (x1
, y1
) and (x2
, y2
), respectively. Both lines are perpendicular to the line linking (x1
, y1
) and (x2
, y2
).
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which to get the bounds.
+ [out] x1 The horizontal coordinate of the first point used to determine the gradient bounds.
+ [out] y1 The vertical coordinate of the first point used to determine the gradient bounds.
+ [out] x2 The horizontal coordinate of the second point used to determine the gradient bounds.
+ [out] y2 The vertical coordinate of the second point used to determine the gradient bounds.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
+
+
+
+
◆ tvg_linear_gradient_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Gradient * tvg_linear_gradient_new
+ (
+ )
+
+
+
+
+
+
Creates a new linear gradient object.
+
+
+
+
+
+
{
+
{0.0, 0, 0, 0, 255},
+
{1.0, 0, 255, 0, 255},
+
};
+
+
+
Returns A new linear gradient object.
+
+
+
+
+
◆ tvg_linear_gradient_set()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_linear_gradient_set
+ (
+ Tvg_Gradient *
+ grad ,
+
+
+
+
+ float
+ x1 ,
+
+
+
+
+ float
+ y1 ,
+
+
+
+
+ float
+ x2 ,
+
+
+
+
+ float
+ y2
+
+
+
+ )
+
+
+
+
+
+
Sets the linear gradient bounds.
+
The bounds of the linear gradient are defined as a surface constrained by two parallel lines crossing the given points (x1
, y1
) and (x2
, y2
), respectively. Both lines are perpendicular to the line linking (x1
, y1
) and (x2
, y2
).
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which bounds are to be set.
+ [in] x1 The horizontal coordinate of the first point used to determine the gradient bounds.
+ [in] y1 The vertical coordinate of the first point used to determine the gradient bounds.
+ [in] x2 The horizontal coordinate of the second point used to determine the gradient bounds.
+ [in] y2 The vertical coordinate of the second point used to determine the gradient bounds.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
Note In case the first and the second points are equal, an object filled with such a gradient fill is not rendered.
+
+
+
+
+
◆ tvg_radial_gradient_get()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_radial_gradient_get
+ (
+ Tvg_Gradient *
+ grad ,
+
+
+
+
+ float *
+ cx ,
+
+
+
+
+ float *
+ cy ,
+
+
+
+
+ float *
+ radius
+
+
+
+ )
+
+
+
+
+
+
The function gets radial gradient center point ant radius.
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which bounds are to be set.
+ [out] cx The horizontal coordinate of the center of the bounding circle.
+ [out] cy The vertical coordinate of the center of the bounding circle.
+ [out] radius The radius of the bounding circle.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer.
+
+
+
+
+
+
+
+
◆ tvg_radial_gradient_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Gradient * tvg_radial_gradient_new
+ (
+ )
+
+
+
+
+
+
Creates a new radial gradient object.
+
+
+
+
+
+
{
+
{0.0, 0, 0, 0, 255},
+
{1.0, 0, 255, 0, 255},
+
};
+
+
+
Returns A new radial gradient object.
+
+
+
+
+
◆ tvg_radial_gradient_set()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_radial_gradient_set
+ (
+ Tvg_Gradient *
+ grad ,
+
+
+
+
+ float
+ cx ,
+
+
+
+
+ float
+ cy ,
+
+
+
+
+ float
+ radius
+
+
+
+ )
+
+
+
+
+
+
Sets the radial gradient bounds.
+
The radial gradient bounds are defined as a circle centered in a given point (cx
, cy
) of a given radius.
+
Parameters
+
+ [in] grad The Tvg_Gradient object of which bounds are to be set.
+ [in] cx The horizontal coordinate of the center of the bounding circle.
+ [in] cy The vertical coordinate of the center of the bounding circle.
+ [in] radius The radius of the bounding circle.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Gradient pointer or the radius
value less than zero.
+
+
+
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_gradient_set_color_stops(Tvg_Gradient *grad, const Tvg_Color_Stop *color_stop, uint32_t cnt)
Sets the parameters of the colors of the gradient and their position.
+TVG_EXPORT Tvg_Result tvg_shape_append_rect(Tvg_Paint *paint, float x, float y, float w, float h, float rx, float ry)
Appends a rectangle to the path.
+TVG_EXPORT Tvg_Gradient * tvg_radial_gradient_new()
Creates a new radial gradient object.
+TVG_EXPORT Tvg_Paint * tvg_shape_new()
Creates a new shape object.
+TVG_EXPORT Tvg_Result tvg_shape_set_linear_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the linear gradient fill for all of the figures from the path.
+TVG_EXPORT Tvg_Result tvg_radial_gradient_set(Tvg_Gradient *grad, float cx, float cy, float radius)
Sets the radial gradient bounds.
+TVG_EXPORT Tvg_Result tvg_linear_gradient_set(Tvg_Gradient *grad, float x1, float y1, float x2, float y2)
Sets the linear gradient bounds.
+struct _Tvg_Gradient Tvg_Gradient
A structure representing a gradient fill of a Tvg_Paint object.
Definition: thorvg_capi.h:69
+struct _Tvg_Paint Tvg_Paint
A structure representing a graphical element.
Definition: thorvg_capi.h:63
+TVG_EXPORT Tvg_Gradient * tvg_linear_gradient_new()
Creates a new linear gradient object.
+A data structure storing the information about the color and its relative position inside the gradien...
Definition: thorvg_capi.h:184
+TVG_EXPORT Tvg_Result tvg_shape_set_radial_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the radial gradient fill for all of the figures from the path.
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Gradient.map b/docs/html/group__ThorVGCapi__Gradient.map
new file mode 100644
index 00000000..0ed85924
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Gradient.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Gradient.md5 b/docs/html/group__ThorVGCapi__Gradient.md5
new file mode 100644
index 00000000..6121c04c
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Gradient.md5
@@ -0,0 +1 @@
+5ed575f53580b9f1f946616c4ddd91ad
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Gradient.png b/docs/html/group__ThorVGCapi__Gradient.png
new file mode 100644
index 00000000..bba14d3b
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Gradient.png differ
diff --git a/docs/html/group__ThorVGCapi__Initializer.html b/docs/html/group__ThorVGCapi__Initializer.html
new file mode 100644
index 00000000..b454f26b
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Initializer.html
@@ -0,0 +1,247 @@
+
+
+
+
+
+
+
+ThorVG: Initializer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module enabling initialization and termination of the TVG engines.
+More...
+
+
+
+
+
A module enabling initialization and termination of the TVG engines.
+
+
+
◆ Tvg_Engine
+
+
+
+
+
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise operation is allowed.
+
+Enumerator TVG_ENGINE_SW CPU rasterizer.
+
+ TVG_ENGINE_GL OpenGL rasterizer.
+
+
+
+
+
+
+
+
◆ tvg_engine_init()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_engine_init
+ (
+ Tvg_Engine
+ engine_method ,
+
+
+
+
+ unsigned
+ threads
+
+
+
+ )
+
+
+
+
+
+
Initializes TVG engines.
+
TVG requires the running-engine environment. TVG runs its own task-scheduler for parallelizing rendering tasks efficiently. You can indicate the number of threads, the count of which is designated threads
. In the initialization step, TVG will generate/spawn the threads as set by threads
count.
+
Parameters
+
+ [in] engine_method The engine types to initialize. This is relative to the Canvas types, in which it will be used. For multiple backends bitwise operation is allowed.
+TVG_ENGINE_SW: CPU rasterizer
+TVG_ENGINE_GL: OpenGL rasterizer (not supported yet)
+
+
+ [in] threads The number of additional threads used to perform rendering. Zero indicates only the main thread is to be used.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_FAILED_ALLOCATION An internal error possibly with memory allocation.
+ TVG_RESULT_INVALID_ARGUMENT Unknown engine type.
+ TVG_RESULT_NOT_SUPPORTED Unsupported engine type.
+ TVG_RESULT_UNKNOWN Other error.
+
+
+
+
Note The Initializer keeps track of the number of times it was called. Threads count is fixed at the first init() call.
+
See also tvg_engine_term()
+
+Tvg_Engine
+
+
+
+
+
◆ tvg_engine_term()
+
+
+
+
+
Terminates TVG engines.
+
It should be called in case of termination of the TVG client with the same engine types as were passed when tvg_engine_init() was called.
+
Parameters
+
+ engine_method The engine types to terminate. This is relative to the Canvas types, in which it will be used. For multiple backends bitwise operation is allowed
+TVG_ENGINE_SW: CPU rasterizer
+TVG_ENGINE_GL: OpenGL rasterizer (not supported yet)
+
+
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INSUFFICIENT_CONDITION Nothing to be terminated.
+ TVG_RESULT_INVALID_ARGUMENT Unknown engine type.
+ TVG_RESULT_NOT_SUPPORTED Unsupported engine type.
+ TVG_RESULT_UNKNOWN An internal error.
+
+
+
+
See also tvg_engine_init()
+
+Tvg_Engine
+
+
+
+
+@ TVG_ENGINE_SW
CPU rasterizer.
Definition: thorvg_capi.h:84
+TVG_EXPORT Tvg_Result tvg_engine_init(Tvg_Engine engine_method, unsigned threads)
Initializes TVG engines.
+TVG_EXPORT Tvg_Result tvg_engine_term(Tvg_Engine engine_method)
Terminates TVG engines.
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Initializer.map b/docs/html/group__ThorVGCapi__Initializer.map
new file mode 100644
index 00000000..b5252479
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Initializer.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Initializer.md5 b/docs/html/group__ThorVGCapi__Initializer.md5
new file mode 100644
index 00000000..99fb4900
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Initializer.md5
@@ -0,0 +1 @@
+a876f294b034ffcd3ac1c3151851ce1c
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Initializer.png b/docs/html/group__ThorVGCapi__Initializer.png
new file mode 100644
index 00000000..fbd96255
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Initializer.png differ
diff --git a/docs/html/group__ThorVGCapi__Paint.html b/docs/html/group__ThorVGCapi__Paint.html
new file mode 100644
index 00000000..11294b35
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Paint.html
@@ -0,0 +1,766 @@
+
+
+
+
+
+
+
+ThorVG: Paint
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module for managing graphical elements. It enables duplication, transformation and composition.
+More...
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_paint_del (Tvg_Paint *paint)
+ Releases the given Tvg_Paint object. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_scale (Tvg_Paint *paint, float factor)
+ Scales the given Tvg_Paint object by the given factor. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_rotate (Tvg_Paint *paint, float degree)
+ Rotates the given Tvg_Paint by the given angle. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_translate (Tvg_Paint *paint, float x, float y)
+ Moves the given Tvg_Paint in a two-dimensional space. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_set_transform (Tvg_Paint *paint, const Tvg_Matrix *m)
+ Transforms the given Tvg_Paint using the augmented transformation matrix. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_get_transform (Tvg_Paint *paint, Tvg_Matrix *m)
+ Gets the matrix of the affine transformation of the given Tvg_Paint object. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_set_opacity (Tvg_Paint *paint, uint8_t opacity)
+ Sets the opacity of the given Tvg_Paint. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_get_opacity (const Tvg_Paint *paint, uint8_t *opacity)
+ Gets the opacity of the given Tvg_Paint. More...
+
+TVG_EXPORT Tvg_Paint * tvg_paint_duplicate (Tvg_Paint *paint)
+ Duplicates the given Tvg_Paint object. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_get_bounds (const Tvg_Paint *paint, float *x, float *y, float *w, float *h, bool transformed)
+ Gets the axis-aligned bounding box of the Tvg_Paint object. (BETA_API) More...
+
+TVG_EXPORT Tvg_Result tvg_paint_set_composite_method (Tvg_Paint *paint, Tvg_Paint *target, Tvg_Composite_Method method)
+ Sets the composition target object and the composition method. More...
+
+TVG_EXPORT Tvg_Result tvg_paint_get_composite_method (const Tvg_Paint *paint, const Tvg_Paint **target, Tvg_Composite_Method *method)
+ Gets the composition target object and the composition method. More...
+
+
+
+
A module for managing graphical elements. It enables duplication, transformation and composition.
+
+
+
◆ Tvg_Composite_Method
+
+
+
+
+
Enumeration indicating the method used in the composition of two objects - the target and the source.
+
+Enumerator TVG_COMPOSITE_METHOD_NONE No composition is applied.
+
+ TVG_COMPOSITE_METHOD_CLIP_PATH The intersection of the source and the target is determined and only the resulting pixels from the source are rendered.
+
+ TVG_COMPOSITE_METHOD_ALPHA_MASK The pixels of the source and the target are alpha blended. As a result, only the part of the source, which intersects with the target is visible.
+
+ TVG_COMPOSITE_METHOD_INVERSE_ALPHA_MASK The pixels of the source and the complement to the target's pixels are alpha blended. As a result, only the part of the source which is not covered by the target is visible.
+
+
+
+
+
+
+
+
◆ tvg_paint_del()
+
+
+
+
+
Releases the given Tvg_Paint object.
+
+
+
+
+
int rectangle_delete(void ) {
+
+
rect = NULL;
+
}
+
+
int cleanup(void ) {
+
+
+
canvas = NULL;
+
}
+
Parameters
+
+ [in] paint The Tvg_Paint object to be released.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Warning If this function is used, tvg_canvas_clear() with the free
argument value set to false
should be used in order to avoid unexpected behaviours.
+
See also tvg_canvas_clear() , tvg_canvas_destroy()
+
+
+
+
+
◆ tvg_paint_duplicate()
+
+
+
+
+
Duplicates the given Tvg_Paint object.
+
Creates a new object and sets its all properties as in the original object.
+
Parameters
+
+ [in] paint The Tvg_Paint object to be copied.
+
+
+
+
Returns A copied Tvg_Paint object if succeed, nullptr
otherwise.
+
+
+
+
+
◆ tvg_paint_get_bounds()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_get_bounds
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ float *
+ x ,
+
+
+
+
+ float *
+ y ,
+
+
+
+
+ float *
+ w ,
+
+
+
+
+ float *
+ h ,
+
+
+
+
+ bool
+ transformed
+
+
+
+ )
+
+
+
+
+
+
Gets the axis-aligned bounding box of the Tvg_Paint object. (BETA_API)
+
Parameters
+
+ [in] paint The Tvg_Paint object of which to get the bounds.
+ [out] x The x coordinate of the upper left corner of the object.
+ [out] y The y coordinate of the upper left corner of the object.
+ [out] w The width of the object.
+ [out] h The height of the object.
+ [in] transformed If true
, the transformation of the paint is taken into account, otherwise it isn't.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION Other errors.
+
+
+
+
Note The bounding box doesn't indicate the actual drawing region. It's the smallest rectangle that encloses the object.
+
+
+
+
+
◆ tvg_paint_get_composite_method()
+
+
+
+
+
Gets the composition target object and the composition method.
+
Parameters
+
+ [in] paint The source object of the composition.
+ [out] target The target object of the composition.
+ [out] method The method used to composite the source object with the target.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
is passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_paint_get_opacity()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_get_opacity
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t *
+ opacity
+
+
+
+ )
+
+
+
+
+
+
Gets the opacity of the given Tvg_Paint.
+
Parameters
+
+ [in] paint The Tvg_Paint object of which to get the opacity value.
+ [out] opacity The opacity value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT In case a nullptr
is passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_paint_get_transform()
+
+
+
+
+
Gets the matrix of the affine transformation of the given Tvg_Paint object.
+
In case no transformation was applied, the identity matrix is returned.
+
Parameters
+
+ [in] paint The Tvg_Paint object of which to get the transformation matrix.
+ [out] m The 3x3 augmented matrix.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
is passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_paint_rotate()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_rotate
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ degree
+
+
+
+ )
+
+
+
+
+
+
Rotates the given Tvg_Paint by the given angle.
+
The angle in measured clockwise from the horizontal axis. The rotational axis passes through the point on the object with zero coordinates.
+
Parameters
+
+ [in] paint The Tvg_Paint object to be rotated.
+ [in] degree The value of the rotation angle in degrees.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_paint_scale()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_scale
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ factor
+
+
+
+ )
+
+
+
+
+
+
Scales the given Tvg_Paint object by the given factor.
+
Parameters
+
+ [in] paint The Tvg_Paint object to be scaled.
+ [in] factor The value of the scaling factor. The default value is 1.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_paint_set_composite_method()
+
+
+
+
+
Sets the composition target object and the composition method.
+
Parameters
+
+ [in] paint The source object of the composition.
+ [in] target The target object of the composition.
+ [in] method The method used to composite the source object with the target.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid paint
or target
object or the method
equal to TVG_COMPOSITE_METHOD_NONE.
+
+
+
+
+
+
+
+
◆ tvg_paint_set_opacity()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_set_opacity
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t
+ opacity
+
+
+
+ )
+
+
+
+
+
+
Sets the opacity of the given Tvg_Paint.
+
Parameters
+
+ [in] paint The Tvg_Paint object of which the opacity value is to be set.
+ [in] opacity The opacity value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note Setting the opacity with this API may require multiple renderings using a composition. It is recommended to avoid changing the opacity if possible.
+
+
+
+
+
◆ tvg_paint_set_transform()
+
+
+
+
+
Transforms the given Tvg_Paint using the augmented transformation matrix.
+
The augmented matrix of the transformation is expected to be given.
+
Parameters
+
+ [in] paint The Tvg_Paint object to be transformed.
+ [in] m The 3x3 augmented matrix.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
is passed as the argument.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_paint_translate()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_paint_translate
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ x ,
+
+
+
+
+ float
+ y
+
+
+
+ )
+
+
+
+
+
+
Moves the given Tvg_Paint in a two-dimensional space.
+
The origin of the coordinate system is in the upper left corner of the canvas. The horizontal and vertical axes point to the right and down, respectively.
+
Parameters
+
+ [in] paint The Tvg_Paint object to be shifted.
+ [in] x The value of the horizontal shift.
+ [in] y The value of the vertical shift.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with memory allocation.
+
+
+
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_canvas_clear(Tvg_Canvas *canvas, bool free)
Sets the total number of the paints pushed into the canvas to be zero. Tvg_Paint objects stored in th...
+TVG_EXPORT Tvg_Result tvg_paint_del(Tvg_Paint *paint)
Releases the given Tvg_Paint object.
+struct _Tvg_Paint Tvg_Paint
A structure representing a graphical element.
Definition: thorvg_capi.h:63
+TVG_EXPORT Tvg_Result tvg_canvas_destroy(Tvg_Canvas *canvas)
Clears the canvas internal data, releases all paints stored by the canvas and destroys the canvas obj...
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Paint.map b/docs/html/group__ThorVGCapi__Paint.map
new file mode 100644
index 00000000..bc55c329
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Paint.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Paint.md5 b/docs/html/group__ThorVGCapi__Paint.md5
new file mode 100644
index 00000000..48058f6c
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Paint.md5
@@ -0,0 +1 @@
+d092f8ef507280d8786e14a192d9463a
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Paint.png b/docs/html/group__ThorVGCapi__Paint.png
new file mode 100644
index 00000000..6745289c
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Paint.png differ
diff --git a/docs/html/group__ThorVGCapi__Picture.html b/docs/html/group__ThorVGCapi__Picture.html
new file mode 100644
index 00000000..8799762b
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Picture.html
@@ -0,0 +1,467 @@
+
+
+
+
+
+
+
+ThorVG: Picture
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module enabling to create and to load an image in one of the supported formats: svg, png, jpg and raw.
+More...
+
+
+
+
+TVG_EXPORT Tvg_Paint * tvg_picture_new ()
+ Creates a new picture object. More...
+
+TVG_EXPORT Tvg_Result tvg_picture_load (Tvg_Paint *paint, const char *path)
+ Loads a picture data directly from a file. More...
+
+TVG_EXPORT Tvg_Result tvg_picture_load_raw (Tvg_Paint *paint, uint32_t *data, uint32_t w, uint32_t h, bool copy)
+ Loads a picture data from a memory block of a given size. (BETA_API) More...
+
+TVG_EXPORT Tvg_Result tvg_picture_load_data (Tvg_Paint *paint, const char *data, uint32_t size, const char *mimetype, bool copy)
+ Loads a picture data from a memory block of a given size. More...
+
+TVG_EXPORT Tvg_Result tvg_picture_set_size (Tvg_Paint *paint, float w, float h)
+ Resizes the picture content to the given width and height. More...
+
+TVG_EXPORT Tvg_Result tvg_picture_get_size (const Tvg_Paint *paint, float *w, float *h)
+ Gets the size of the loaded picture. More...
+
+TVG_EXPORT Tvg_Result tvg_picture_get_viewbox (const Tvg_Paint *paint, float *x, float *y, float *w, float *h)
+ Gets the position and the size of the loaded picture. (BETA_API) More...
+
+
+
+
A module enabling to create and to load an image in one of the supported formats: svg, png, jpg and raw.
+
+
+
◆ tvg_picture_get_size()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_get_size
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ float *
+ w ,
+
+
+
+
+ float *
+ h
+
+
+
+ )
+
+
+
+
+
+
Gets the size of the loaded picture.
+
Parameters
+
+ [out] w A width of the image in pixels.
+ [out] h A height of the image in pixels.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
◆ tvg_picture_get_viewbox()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_get_viewbox
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ float *
+ x ,
+
+
+
+
+ float *
+ y ,
+
+
+
+
+ float *
+ w ,
+
+
+
+
+ float *
+ h
+
+
+
+ )
+
+
+
+
+
+
Gets the position and the size of the loaded picture. (BETA_API)
+
Warning Please do not use it, this API is not official one. It can be modified in the next version.
+
+
+
+
+
◆ tvg_picture_load()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_load
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ const char *
+ path
+
+
+
+ )
+
+
+
+
+
+
Loads a picture data directly from a file.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the picture object.
+ [in] path The absolute path to the image file.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer or an empty path
.
+ TVG_RESULT_NOT_SUPPORTED A file with an unknown extension.
+ TVG_RESULT_UNKNOWN An error at a later stage.
+
+
+
+
+
+
+
+
◆ tvg_picture_load_data()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_load_data
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ const char *
+ data ,
+
+
+
+
+ uint32_t
+ size ,
+
+
+
+
+ const char *
+ mimetype ,
+
+
+
+
+ bool
+ copy
+
+
+
+ )
+
+
+
+
+
+
Loads a picture data from a memory block of a given size.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the picture object.
+ [in] data A pointer to a memory location where the content of the picture file is stored.
+ [in] size The size in bytes of the memory occupied by the data
.
+ [in] mimetype Mimetype or extension of data such as "jpg", "jpeg", "svg", "svg+xml", "png", etc. In case an empty string or an unknown type is provided, the loaders will be tried one by one.
+ [in] copy If true
the data are copied into the engine local buffer, otherwise they are not.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT In case a nullptr
is passed as the argument or the size
is zero or less.
+ TVG_RESULT_NOT_SUPPORTED A file with an unknown extension.
+ TVG_RESULT_UNKNOWN An error at a later stage.
+
+
+
+
Warning : It's the user responsibility to release the data
memory if the copy
is true
.
+
+
+
+
+
◆ tvg_picture_load_raw()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_load_raw
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ uint32_t *
+ data ,
+
+
+
+
+ uint32_t
+ w ,
+
+
+
+
+ uint32_t
+ h ,
+
+
+
+
+ bool
+ copy
+
+
+
+ )
+
+
+
+
+
+
Loads a picture data from a memory block of a given size. (BETA_API)
+
Returns Tvg_Result return value
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_PARAMETERS An invalid Tvg_Paint.
+
+
+
+
Warning Please do not use it, this API is not official one. It can be modified in the next version.
+
+
+
+
+
◆ tvg_picture_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Paint * tvg_picture_new
+ (
+ )
+
+
+
+
+
+
Creates a new picture object.
+
Returns A new picture object.
+
+
+
+
+
◆ tvg_picture_set_size()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_picture_set_size
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ w ,
+
+
+
+
+ float
+ h
+
+
+
+ )
+
+
+
+
+
+
Resizes the picture content to the given width and height.
+
The picture content is resized while keeping the default size aspect ratio. The scaling factor is established for each of dimensions and the smaller value is applied to both of them.
+
Parameters
+
+ [in] w A new width of the image in pixels.
+ [in] h A new height of the image in pixels.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION An internal error.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Picture.map b/docs/html/group__ThorVGCapi__Picture.map
new file mode 100644
index 00000000..c299ca9c
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Picture.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Picture.md5 b/docs/html/group__ThorVGCapi__Picture.md5
new file mode 100644
index 00000000..8b852d1a
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Picture.md5
@@ -0,0 +1 @@
+f09123103b2bf98dfd86cfeed319f431
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Picture.png b/docs/html/group__ThorVGCapi__Picture.png
new file mode 100644
index 00000000..d6eda2fe
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Picture.png differ
diff --git a/docs/html/group__ThorVGCapi__Saver.html b/docs/html/group__ThorVGCapi__Saver.html
new file mode 100644
index 00000000..8fa63bf5
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Saver.html
@@ -0,0 +1,271 @@
+
+
+
+
+
+
+
+ThorVG: Saver
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module for exporting a paint object into a specified file.
+More...
+
+
+
+
+
A module for exporting a paint object into a specified file.
+
The module enables to save the composed scene and/or image from a paint object. Once it's successfully exported to a file, it can be recreated using the Picture module.
+
+
+
◆ tvg_saver_del()
+
+
+
+
+
Deletes the given Tvg_Saver object.
+
Parameters
+
+ [in] saver The Tvg_Saver object to be deleted.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Saver pointer.
+
+
+
+
+
+
+
+
◆ tvg_saver_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Saver * tvg_saver_new
+ (
+ )
+
+
+
+
+
+
Creates a new Tvg_Saver object.
+
Returns A new Tvg_Saver object.
+
+
+
+
+
◆ tvg_saver_save()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_saver_save
+ (
+ Tvg_Saver *
+ saver ,
+
+
+
+
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ const char *
+ path ,
+
+
+
+
+ bool
+ compress
+
+
+
+ )
+
+
+
+
+
+
Exports the given paint
data to the given path
.
+
If the saver module supports any compression mechanism, it will optimize the data size. This might affect the encoding/decoding time in some cases. You can turn off the compression if you wish to optimize for speed.
+
Parameters
+
+ [in] saver The Tvg_Saver object connected with the saving task.
+ [in] paint The paint to be saved with all its associated properties.
+ [in] path A path to the file, in which the paint data is to be saved.
+ [in] compress If true
then compress data if possible.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+ TVG_RESULT_INSUFFICIENT_CONDITION Currently saving other resources.
+ TVG_RESULT_NOT_SUPPORTED Trying to save a file with an unknown extension or in an unsupported format.
+ TVG_RESULT_MEMORY_CORRUPTION An internal error.
+ TVG_RESULT_UNKNOWN An empty paint is to be saved.
+
+
+
+
Note Saving can be asynchronous if the assigned thread number is greater than zero. To guarantee the saving is done, call tvg_saver_sync() afterwards.
+
See also tvg_saver_sync()
+
+
+
+
+
◆ tvg_saver_sync()
+
+
+
+
+
Guarantees that the saving task is finished.
+
The behavior of the Saver module works on a sync/async basis, depending on the threading setting of the Initializer. Thus, if you wish to have a benefit of it, you must call tvg_saver_sync() after the tvg_saver_save() in the proper delayed time. Otherwise, you can call tvg_saver_sync() immediately.
+
Parameters
+
+ [in] saver The Tvg_Saver object connected with the saving task.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+ TVG_RESULT_INSUFFICIENT_CONDITION No saving task is running.
+
+
+
+
Note The asynchronous tasking is dependent on the Saver module implementation.
+
See also tvg_saver_save()
+
+
+
+
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Saver.map b/docs/html/group__ThorVGCapi__Saver.map
new file mode 100644
index 00000000..19600407
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Saver.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Saver.md5 b/docs/html/group__ThorVGCapi__Saver.md5
new file mode 100644
index 00000000..0eaef24f
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Saver.md5
@@ -0,0 +1 @@
+30a05053b021da4601ed8cb15d65431f
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Saver.png b/docs/html/group__ThorVGCapi__Saver.png
new file mode 100644
index 00000000..772506a3
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Saver.png differ
diff --git a/docs/html/group__ThorVGCapi__Scene.html b/docs/html/group__ThorVGCapi__Scene.html
new file mode 100644
index 00000000..7924ae5f
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Scene.html
@@ -0,0 +1,277 @@
+
+
+
+
+
+
+
+ThorVG: Scene
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module managing the multiple paints as one group paint.
+More...
+
+
+
+
+
A module managing the multiple paints as one group paint.
+
As a group, scene can be transformed, translucent, composited with other target paints, its children will be affected by the scene world.
+
+
+
◆ tvg_scene_clear()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_scene_clear
+ (
+ Tvg_Paint *
+ scene ,
+
+
+
+
+ bool
+ free
+
+
+
+ )
+
+
+
+
+
+
Clears a Tvg_Scene objects from pushed paints.
+
Tvg_Paint objects stored in the scene are released if free
is set to true
, otherwise the memory is not deallocated and all paints should be released manually in order to avoid memory leaks.
+
Parameters
+
+ [in] scene The Tvg_Scene object to be cleared.
+ [in] free If true
the memory occupied by paints is deallocated, otherwise it is not.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Canvas pointer.
+
+
+
+
Warning Please use the free
argument only when you know how it works, otherwise it's not recommended.
+
+
+
+
+
◆ tvg_scene_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Paint * tvg_scene_new
+ (
+ )
+
+
+
+
+
+
Creates a new scene object.
+
A scene object is used to group many paints into one object, which can be manipulated using TVG APIs.
+
Returns A new scene object.
+
+
+
+
+
◆ tvg_scene_push()
+
+
+
+
+
Passes drawing elements to the scene using Tvg_Paint objects.
+
Only the paints pushed into the scene will be the drawn targets. The paints are retained by the scene until the tvg_scene_clear() is called. If you know the number of pushed objects in advance, please call tvg_scene_reserve() .
+
Parameters
+
+ [in] scene A Tvg_Paint pointer to the scene object.
+ [in] paint A graphical object to be drawn.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+ TVG_RESULT_MEMORY_CORRUPTION An internal error.
+
+
+
+
Note The rendering order of the paints is the same as the order as they were pushed. Consider sorting the paints before pushing them if you intend to use layering.
+
See also tvg_scene_reserve()
+
+
+
+
+
◆ tvg_scene_reserve()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_scene_reserve
+ (
+ Tvg_Paint *
+ scene ,
+
+
+
+
+ uint32_t
+ size
+
+
+
+ )
+
+
+
+
+
+
Sets the size of the container, where all the paints pushed into the scene are stored.
+
If the number of objects pushed into the scene is known in advance, calling the function prevents multiple memory reallocation, thus improving the performance.
+
Parameters
+
+ [in] scene A Tvg_Paint pointer to the scene object.
+ [in] size The number of objects for which the memory is to be reserved.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Scene.map b/docs/html/group__ThorVGCapi__Scene.map
new file mode 100644
index 00000000..3457a84c
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Scene.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Scene.md5 b/docs/html/group__ThorVGCapi__Scene.md5
new file mode 100644
index 00000000..75534e70
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Scene.md5
@@ -0,0 +1 @@
+59bad3566a75a217d40bc307a3969b94
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Scene.png b/docs/html/group__ThorVGCapi__Scene.png
new file mode 100644
index 00000000..1823cf2e
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Scene.png differ
diff --git a/docs/html/group__ThorVGCapi__Shape.html b/docs/html/group__ThorVGCapi__Shape.html
new file mode 100644
index 00000000..9157f171
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Shape.html
@@ -0,0 +1,2126 @@
+
+
+
+
+
+
+
+ThorVG: Shape
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module for managing two-dimensional figures and their properties.
+More...
+
+
+
+
+enum Tvg_Path_Command { TVG_PATH_COMMAND_CLOSE = 0,
+TVG_PATH_COMMAND_MOVE_TO ,
+TVG_PATH_COMMAND_LINE_TO ,
+TVG_PATH_COMMAND_CUBIC_TO
+ }
+ Enumeration specifying the values of the path commands accepted by TVG. More...
+
+enum Tvg_Stroke_Cap { TVG_STROKE_CAP_SQUARE = 0,
+TVG_STROKE_CAP_ROUND ,
+TVG_STROKE_CAP_BUTT
+ }
+ Enumeration determining the ending type of a stroke in the open sub-paths. More...
+
+enum Tvg_Stroke_Join { TVG_STROKE_JOIN_BEVEL = 0,
+TVG_STROKE_JOIN_ROUND ,
+TVG_STROKE_JOIN_MITER
+ }
+ Enumeration specifying how to fill the area outside the gradient bounds. More...
+
+enum Tvg_Stroke_Fill { TVG_STROKE_FILL_PAD = 0,
+TVG_STROKE_FILL_REFLECT ,
+TVG_STROKE_FILL_REPEAT
+ }
+ Enumeration specifying how to fill the area outside the gradient bounds. More...
+
+enum Tvg_Fill_Rule { TVG_FILL_RULE_WINDING = 0,
+TVG_FILL_RULE_EVEN_ODD
+ }
+ Enumeration specifying the algorithm used to establish which parts of the shape are treated as the inside of the shape. More...
+
+
+
+TVG_EXPORT Tvg_Paint * tvg_shape_new ()
+ Creates a new shape object. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_reset (Tvg_Paint *paint)
+ Resets the shape path properties. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_move_to (Tvg_Paint *paint, float x, float y)
+ Sets the initial point of the sub-path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_line_to (Tvg_Paint *paint, float x, float y)
+ Adds a new point to the sub-path, which results in drawing a line from the current point to the given end-point. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_cubic_to (Tvg_Paint *paint, float cx1, float cy1, float cx2, float cy2, float x, float y)
+ Adds new points to the sub-path, which results in drawing a cubic Bezier curve. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_close (Tvg_Paint *paint)
+ Closes the current sub-path by drawing a line from the current point to the initial point of the sub-path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_append_rect (Tvg_Paint *paint, float x, float y, float w, float h, float rx, float ry)
+ Appends a rectangle to the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_append_circle (Tvg_Paint *paint, float cx, float cy, float rx, float ry)
+ Appends an ellipse to the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_append_arc (Tvg_Paint *paint, float cx, float cy, float radius, float startAngle, float sweep, uint8_t pie)
+ Appends a circular arc to the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_append_path (Tvg_Paint *paint, const Tvg_Path_Command *cmds, uint32_t cmdCnt, const Tvg_Point *pts, uint32_t ptsCnt)
+ Appends a given sub-path to the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_path_coords (const Tvg_Paint *paint, const Tvg_Point **pts, uint32_t *cnt)
+ Gets the points values of the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_path_commands (const Tvg_Paint *paint, const Tvg_Path_Command **cmds, uint32_t *cnt)
+ Gets the commands data of the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_width (Tvg_Paint *paint, float width)
+ Sets the stroke width for all of the figures from the paint
. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_width (const Tvg_Paint *paint, float *width)
+ Gets the shape's stroke width. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_color (Tvg_Paint *paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
+ Sets the shape's stroke color. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_color (const Tvg_Paint *paint, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
+ Gets the shape's stroke color. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_linear_gradient (Tvg_Paint *paint, Tvg_Gradient *grad)
+ Sets the linear gradient fill of the stroke for all of the figures from the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_radial_gradient (Tvg_Paint *paint, Tvg_Gradient *grad)
+ Sets the radial gradient fill of the stroke for all of the figures from the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_gradient (const Tvg_Paint *paint, Tvg_Gradient **grad)
+ Gets the gradient fill of the shape's stroke. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_dash (Tvg_Paint *paint, const float *dashPattern, uint32_t cnt)
+ Sets the shape's stroke dash pattern. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_dash (const Tvg_Paint *paint, const float **dashPattern, uint32_t *cnt)
+ Gets the dash pattern of the stroke. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_cap (Tvg_Paint *paint, Tvg_Stroke_Cap cap)
+ Sets the cap style used for stroking the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_cap (const Tvg_Paint *paint, Tvg_Stroke_Cap *cap)
+ Gets the stroke cap style used for stroking the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_join (Tvg_Paint *paint, Tvg_Stroke_Join join)
+ Sets the join style for stroked path segments. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_join (const Tvg_Paint *paint, Tvg_Stroke_Join *join)
+ The function gets the stroke join method. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_fill_color (Tvg_Paint *paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
+ Sets the shape's solid color. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_fill_color (const Tvg_Paint *paint, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
+ Gets the shape's solid color. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_fill_rule (Tvg_Paint *paint, Tvg_Fill_Rule rule)
+ Sets the shape's fill rule. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_fill_rule (const Tvg_Paint *paint, Tvg_Fill_Rule *rule)
+ Gets the shape's fill rule. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_linear_gradient (Tvg_Paint *paint, Tvg_Gradient *grad)
+ Sets the linear gradient fill for all of the figures from the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_set_radial_gradient (Tvg_Paint *paint, Tvg_Gradient *grad)
+ Sets the radial gradient fill for all of the figures from the path. More...
+
+TVG_EXPORT Tvg_Result tvg_shape_get_gradient (const Tvg_Paint *paint, Tvg_Gradient **grad)
+ Gets the gradient fill of the shape. More...
+
+
+
+
A module for managing two-dimensional figures and their properties.
+
A shape has three major properties: shape outline, stroking, filling. The outline in the shape is retained as the path. Path can be composed by accumulating primitive commands such as tvg_shape_move_to() , tvg_shape_line_to() , tvg_shape_cubic_to() or complete shape interfaces such as tvg_shape_append_rect() , tvg_shape_append_circle() , etc. Path can consists of sub-paths. One sub-path is determined by a close command.
+
The stroke of a shape is an optional property in case the shape needs to be represented with/without the outline borders. It's efficient since the shape path and the stroking path can be shared with each other. It's also convenient when controlling both in one context.
+
+
+
◆ Tvg_Fill_Rule
+
+
+
+
+
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the inside of the shape.
+
+Enumerator TVG_FILL_RULE_WINDING A line from the point to a location outside the shape is drawn. The intersections of the line with the path segment of the shape are counted. Starting from zero, if the path segment of the shape crosses the line clockwise, one is added, otherwise one is subtracted. If the resulting sum is non zero, the point is inside the shape.
+
+ TVG_FILL_RULE_EVEN_ODD A line from the point to a location outside the shape is drawn and its intersections with the path segments of the shape are counted. If the number of intersections is an odd number, the point is inside the shape.
+
+
+
+
+
+
+
◆ Tvg_Path_Command
+
+
+
+
+
Enumeration specifying the values of the path commands accepted by TVG.
+
Not to be confused with the path commands from the svg path element (like M, L, Q, H and many others). TVG interprets all of them and translates to the ones from the PathCommand values.
+
+Enumerator TVG_PATH_COMMAND_CLOSE Ends the current sub-path and connects it with its initial point - corresponds to Z command in the svg path commands.
+
+ TVG_PATH_COMMAND_MOVE_TO Sets a new initial point of the sub-path and a new current point - corresponds to M command in the svg path commands.
+
+ TVG_PATH_COMMAND_LINE_TO Draws a line from the current point to the given point and sets a new value of the current point - corresponds to L command in the svg path commands.
+
+ TVG_PATH_COMMAND_CUBIC_TO Draws a cubic Bezier curve from the current point to the given point using two given control points and sets a new value of the current point - corresponds to C command in the svg path commands.
+
+
+
+
+
+
+
◆ Tvg_Stroke_Cap
+
+
+
+
+
Enumeration determining the ending type of a stroke in the open sub-paths.
+
+Enumerator TVG_STROKE_CAP_SQUARE The stroke is extended in both endpoints of a sub-path by a rectangle, with the width equal to the stroke width and the length equal to the half of the stroke width. For zero length sub-paths the square is rendered with the size of the stroke width.
+
+ TVG_STROKE_CAP_ROUND The stroke is extended in both endpoints of a sub-path by a half circle, with a radius equal to the half of a stroke width. For zero length sub-paths a full circle is rendered.
+
+ TVG_STROKE_CAP_BUTT The stroke ends exactly at each of the two endpoints of a sub-path. For zero length sub-paths no stroke is rendered.
+
+
+
+
+
+
+
◆ Tvg_Stroke_Fill
+
+
+
+
+
Enumeration specifying how to fill the area outside the gradient bounds.
+
+Enumerator TVG_STROKE_FILL_PAD The remaining area is filled with the closest stop color.
+
+ TVG_STROKE_FILL_REFLECT The gradient pattern is reflected outside the gradient area until the expected region is filled.
+
+ TVG_STROKE_FILL_REPEAT The gradient pattern is repeated continuously beyond the gradient area until the expected region is filled.
+
+
+
+
+
+
+
◆ Tvg_Stroke_Join
+
+
+
+
+
Enumeration specifying how to fill the area outside the gradient bounds.
+
+Enumerator TVG_STROKE_JOIN_BEVEL The outer corner of the joined path segments is bevelled at the join point. The triangular region of the corner is enclosed by a straight line between the outer corners of each stroke.
+
+ TVG_STROKE_JOIN_ROUND The outer corner of the joined path segments is rounded. The circular region is centered at the join point.
+
+ TVG_STROKE_JOIN_MITER The outer corner of the joined path segments is spiked. The spike is created by extension beyond the join point of the outer edges of the stroke until they intersect. In case the extension goes beyond the limit, the join style is converted to the Bevel style.
+
+
+
+
+
+
+
+
◆ tvg_shape_append_arc()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_append_arc
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ cx ,
+
+
+
+
+ float
+ cy ,
+
+
+
+
+ float
+ radius ,
+
+
+
+
+ float
+ startAngle ,
+
+
+
+
+ float
+ sweep ,
+
+
+
+
+ uint8_t
+ pie
+
+
+
+ )
+
+
+
+
+
+
Appends a circular arc to the path.
+
The arc is treated as a new sub-path - it is not connected with the previous sub-path. The current point value is set to the end-point of the arc in case pie
is false
, and to the center of the arc otherwise.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] cx The horizontal coordinate of the center of the arc.
+ [in] cy The vertical coordinate of the center of the arc.
+ [in] radius The radius of the arc.
+ [in] startAngle The start angle of the arc given in degrees, measured counter-clockwise from the horizontal line.
+ [in] sweep The central angle of the arc given in degrees, measured counter-clockwise from startAngle
.
+ [in] pie Specifies whether to draw radii from the arc's center to both of its end-point - drawn if true
.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note Setting sweep
value greater than 360 degrees, is equivalent to calling tvg_shape_append_circle(paint, cx, cy, radius, radius).
+
+
+
+
+
◆ tvg_shape_append_circle()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_append_circle
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ cx ,
+
+
+
+
+ float
+ cy ,
+
+
+
+
+ float
+ rx ,
+
+
+
+
+ float
+ ry
+
+
+
+ )
+
+
+
+
+
+
Appends an ellipse to the path.
+
The position of the ellipse is specified by the coordinates of its center - cx
and cy
arguments.
+
The ellipse is treated as a new sub-path - it is not connected with the previous sub-path.
+
The value of the current point is set to (cx
, cy
- ry
).
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] cx The horizontal coordinate of the center of the ellipse.
+ [in] cy The vertical coordinate of the center of the ellipse.
+ [in] rx The x-axis radius of the ellipse.
+ [in] ry The y-axis radius of the ellipse.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
◆ tvg_shape_append_path()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_append_path
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ const Tvg_Path_Command *
+ cmds ,
+
+
+
+
+ uint32_t
+ cmdCnt ,
+
+
+
+
+ const Tvg_Point *
+ pts ,
+
+
+
+
+ uint32_t
+ ptsCnt
+
+
+
+ )
+
+
+
+
+
+
Appends a given sub-path to the path.
+
The current point value is set to the last point from the sub-path. For each command from the cmds
array, an appropriate number of points in pts
array should be specified. If the number of points in the pts
array is different than the number required by the cmds
array, the shape with this sub-path will not be displayed on the screen.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] cmds The array of the commands in the sub-path.
+ [in] cmdCnt The length of the cmds
array.
+ [in] pts The array of the two-dimensional points.
+ [in] ptsCnt The length of the pts
array.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument or cmdCnt
or ptsCnt
equal to zero.
+
+
+
+
+
+
+
+
◆ tvg_shape_append_rect()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_append_rect
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ x ,
+
+
+
+
+ float
+ y ,
+
+
+
+
+ float
+ w ,
+
+
+
+
+ float
+ h ,
+
+
+
+
+ float
+ rx ,
+
+
+
+
+ float
+ ry
+
+
+
+ )
+
+
+
+
+
+
Appends a rectangle to the path.
+
The rectangle with rounded corners can be achieved by setting non-zero values to rx
and ry
arguments. The rx
and ry
values specify the radii of the ellipse defining the rounding of the corners.
+
The position of the rectangle is specified by the coordinates of its upper left corner - x
and y
arguments.
+
The rectangle is treated as a new sub-path - it is not connected with the previous sub-path.
+
The value of the current point is set to (x
+ rx
, y
) - in case rx
is greater than w/2
the current point is set to (x
+ w/2
, y
)
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] x The horizontal coordinate of the upper left corner of the rectangle.
+ [in] y The vertical coordinate of the upper left corner of the rectangle.
+ [in] w The width of the rectangle.
+ [in] h The height of the rectangle.
+ [in] rx The x-axis radius of the ellipse defining the rounded corners of the rectangle.
+ [in] ry The y-axis radius of the ellipse defining the rounded corners of the rectangle.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
&
Note For rx
and ry
greater than or equal to the half of w
and the half of h
, respectively, the shape become an ellipse.
+
+
+
+
+
◆ tvg_shape_close()
+
+
+
+
+
Closes the current sub-path by drawing a line from the current point to the initial point of the sub-path.
+
The value of the current point is set to the initial point of the closed sub-path.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note In case the sub-path does not contain any points, this function has no effect.
+
+
+
+
+
◆ tvg_shape_cubic_to()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_cubic_to
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ cx1 ,
+
+
+
+
+ float
+ cy1 ,
+
+
+
+
+ float
+ cx2 ,
+
+
+
+
+ float
+ cy2 ,
+
+
+
+
+ float
+ x ,
+
+
+
+
+ float
+ y
+
+
+
+ )
+
+
+
+
+
+
Adds new points to the sub-path, which results in drawing a cubic Bezier curve.
+
The Bezier curve starts at the current point and ends at the given end-point (x
, y
). Two control points (cx1
, cy1
) and (cx2
, cy2
) are used to determine the shape of the curve. The value of the current point is set to the given end-point.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] cx1 The horizontal coordinate of the 1st control point.
+ [in] cy1 The vertical coordinate of the 1st control point.
+ [in] cx2 The horizontal coordinate of the 2nd control point.
+ [in] cy2 The vertical coordinate of the 2nd control point.
+ [in] x The horizontal coordinate of the endpoint of the curve.
+ [in] y The vertical coordinate of the endpoint of the curve.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note In case this is the first command in the path, no data from the path are rendered.
+
+
+
+
+
◆ tvg_shape_get_fill_color()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_get_fill_color
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t *
+ r ,
+
+
+
+
+ uint8_t *
+ g ,
+
+
+
+
+ uint8_t *
+ b ,
+
+
+
+
+ uint8_t *
+ a
+
+
+
+ )
+
+
+
+
+
+
Gets the shape's solid color.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] r The red color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] g The green color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. The default value is 0.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_fill_rule()
+
+
+
+
+
Gets the shape's fill rule.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] rule shape's fill rule
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_gradient()
+
+
+
+
+
Gets the gradient fill of the shape.
+
The function does not allocate any data.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] grad The gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_path_commands()
+
+
+
+
+
Gets the commands data of the path.
+
The function does not allocate any data. There is no need to free the cmds
array.
+
+
+
uint32_t len = 0;
+
+
+
+
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] cmds The pointer to the array of the commands from the path.
+ [out] cnt The length of the cmds
array.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_path_coords()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_get_path_coords
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ const Tvg_Point **
+ pts ,
+
+
+
+
+ uint32_t *
+ cnt
+
+
+
+ )
+
+
+
+
+
+
Gets the points values of the path.
+
The function does not allocate any data, it operates on internal memory. There is no need to free the pts
array.
+
+
+
uint32_t len = 0;
+
+
+
+
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] pts The pointer to the array of the two-dimensional points from the path.
+ [out] cnt The length of the pts
array.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT A nullptr
passed as the argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_cap()
+
+
+
+
+
Gets the stroke cap style used for stroking the path.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] cap The cap style value.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_color()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_get_stroke_color
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t *
+ r ,
+
+
+
+
+ uint8_t *
+ g ,
+
+
+
+
+ uint8_t *
+ b ,
+
+
+
+
+ uint8_t *
+ a
+
+
+
+ )
+
+
+
+
+
+
Gets the shape's stroke color.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] r The red color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] g The green color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
+ [out] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_INSUFFICIENT_CONDITION No stroke was set.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_dash()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_get_stroke_dash
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ const float **
+ dashPattern ,
+
+
+
+
+ uint32_t *
+ cnt
+
+
+
+ )
+
+
+
+
+
+
Gets the dash pattern of the stroke.
+
The function does not allocate any memory.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] dashPattern The array of consecutive pair values of the dash length and the gap length.
+ [out] cnt The size of the dashPattern
array.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_gradient()
+
+
+
+
+
Gets the gradient fill of the shape's stroke.
+
The function does not allocate any memory.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] grad The gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_join()
+
+
+
+
+
The function gets the stroke join method.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] join The join style value.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_get_stroke_width()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_get_stroke_width
+ (
+ const Tvg_Paint *
+ paint ,
+
+
+
+
+ float *
+ width
+
+
+
+ )
+
+
+
+
+
+
Gets the shape's stroke width.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [out] width The stroke width.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument.
+
+
+
+
+
+
+
+
◆ tvg_shape_line_to()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_line_to
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ x ,
+
+
+
+
+ float
+ y
+
+
+
+ )
+
+
+
+
+
+
Adds a new point to the sub-path, which results in drawing a line from the current point to the given end-point.
+
The value of the current point is set to the given end-point.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] x The horizontal coordinate of the end-point of the line.
+ [in] y The vertical coordinate of the end-point of the line.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note In case this is the first command in the path, it corresponds to the tvg_shape_move_to() call.
+
+
+
+
+
◆ tvg_shape_move_to()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_move_to
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ x ,
+
+
+
+
+ float
+ y
+
+
+
+ )
+
+
+
+
+
+
Sets the initial point of the sub-path.
+
The value of the current point is set to the given point.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] x The horizontal coordinate of the initial point of the sub-path.
+ [in] y The vertical coordinate of the initial point of the sub-path.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
◆ tvg_shape_new()
+
+
+
+
+
+ TVG_EXPORT Tvg_Paint * tvg_shape_new
+ (
+ )
+
+
+
+
+
+
Creates a new shape object.
+
Returns A new shape object.
+
+
+
+
+
◆ tvg_shape_reset()
+
+
+
+
+
Resets the shape path properties.
+
The color, the fill and the stroke properties are retained.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note The memory, where the path data is stored, is not deallocated at this stage for caching effect.
+
+
+
+
+
◆ tvg_shape_set_fill_color()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_set_fill_color
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t
+ r ,
+
+
+
+
+ uint8_t
+ g ,
+
+
+
+
+ uint8_t
+ b ,
+
+
+
+
+ uint8_t
+ a
+
+
+
+ )
+
+
+
+
+
+
Sets the shape's solid color.
+
The parts of the shape defined as inner are colored.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] r The red color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] g The green color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque. The default value is 0.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
See also tvg_shape_set_fill_rule()
+
+
+
+
+
◆ tvg_shape_set_fill_rule()
+
+
+
+
+
Sets the shape's fill rule.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] rule The fill rule value. The default value is TVG_FILL_RULE_WINDING
.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+
+
+
+
+
+
+
+
◆ tvg_shape_set_linear_gradient()
+
+
+
+
+
Sets the linear gradient fill for all of the figures from the path.
+
The parts of the shape defined as inner are filled.
+
+
+
+
{
+
{0.0 , 0, 0, 0, 255},
+
{0.25, 255, 0, 0, 255},
+
{0.5 , 0, 255, 0, 255},
+
{1.0 , 0, 0, 255, 255}
+
};
+
+
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] grad The linear gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_MEMORY_CORRUPTION An invalid Tvg_Gradient pointer.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
See also tvg_shape_set_fill_rule()
+
+
+
+
+
◆ tvg_shape_set_radial_gradient()
+
+
+
+
+
Sets the radial gradient fill for all of the figures from the path.
+
The parts of the shape defined as inner are filled.
+
+
+
+
{
+
{0.0 , 0, 0, 0, 255},
+
{0.25, 255, 0, 0, 255},
+
{0.5 , 0, 255, 0, 255},
+
{1.0 , 0, 0, 255, 255}
+
};
+
+
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] grad The radial gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_MEMORY_CORRUPTION An invalid Tvg_Gradient pointer.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
See also tvg_shape_set_fill_rule()
+
+
+
+
+
◆ tvg_shape_set_stroke_cap()
+
+
+
+
+
Sets the cap style used for stroking the path.
+
The cap style specifies the shape to be used at the end of the open stroked sub-paths.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] cap The cap style value. The default value is TVG_STROKE_CAP_SQUARE
.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_shape_set_stroke_color()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_set_stroke_color
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ uint8_t
+ r ,
+
+
+
+
+ uint8_t
+ g ,
+
+
+
+
+ uint8_t
+ b ,
+
+
+
+
+ uint8_t
+ a
+
+
+
+ )
+
+
+
+
+
+
Sets the shape's stroke color.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] r The red color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] g The green color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] b The blue color channel value in the range [0 ~ 255]. The default value is 0.
+ [in] a The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
+
+
+
+
◆ tvg_shape_set_stroke_dash()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_set_stroke_dash
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ const float *
+ dashPattern ,
+
+
+
+
+ uint32_t
+ cnt
+
+
+
+ )
+
+
+
+
+
+
Sets the shape's stroke dash pattern.
+
+
float dashPattern[2] = {20, 10};
+
float dashPattern[2] = {40, 20};
+
float dashPattern[4] = {10, 20, 30, 40}
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] dashPattern The array of consecutive pair values of the dash length and the gap length.
+ [in] cnt The size of the dashPattern
array.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid pointer passed as an argument and cnt
> 0, the given length of the array is less than two or any of the dashPattern
values is zero or less.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
Note To reset the stroke dash pattern, pass nullptr
to dashPattern
and zero to cnt
.
+
+
+
+
+
◆ tvg_shape_set_stroke_join()
+
+
+
+
+
Sets the join style for stroked path segments.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] join The join style value. The default value is TVG_STROKE_JOIN_BEVEL
.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
+
+
+
+
◆ tvg_shape_set_stroke_linear_gradient()
+
+
+
+
+
Sets the linear gradient fill of the stroke for all of the figures from the path.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] grad The linear gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+ TVG_RESULT_MEMORY_CORRUPTION An invalid Tvg_Gradient pointer.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
+
+
+
+
◆ tvg_shape_set_stroke_radial_gradient()
+
+
+
+
+
Sets the radial gradient fill of the stroke for all of the figures from the path.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] grad The radial gradient fill.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+ TVG_RESULT_MEMORY_CORRUPTION An invalid Tvg_Gradient pointer.
+
+
+
+
Note Either a solid color or a gradient fill is applied, depending on what was set as last.
+
+
+
+
+
◆ tvg_shape_set_stroke_width()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_shape_set_stroke_width
+ (
+ Tvg_Paint *
+ paint ,
+
+
+
+
+ float
+ width
+
+
+
+ )
+
+
+
+
+
+
Sets the stroke width for all of the figures from the paint
.
+
Parameters
+
+ [in] paint A Tvg_Paint pointer to the shape object.
+ [in] width The width of the stroke. The default value is 0.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENT An invalid Tvg_Paint pointer.
+ TVG_RESULT_FAILED_ALLOCATION An internal error with a memory allocation.
+
+
+
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_gradient_set_color_stops(Tvg_Gradient *grad, const Tvg_Color_Stop *color_stop, uint32_t cnt)
Sets the parameters of the colors of the gradient and their position.
+TVG_EXPORT Tvg_Result tvg_shape_get_path_coords(const Tvg_Paint *paint, const Tvg_Point **pts, uint32_t *cnt)
Gets the points values of the path.
+TVG_EXPORT Tvg_Gradient * tvg_radial_gradient_new()
Creates a new radial gradient object.
+TVG_EXPORT Tvg_Result tvg_shape_get_path_commands(const Tvg_Paint *paint, const Tvg_Path_Command **cmds, uint32_t *cnt)
Gets the commands data of the path.
+A data structure representing a point in two-dimensional space.
Definition: thorvg_capi.h:199
+TVG_EXPORT Tvg_Paint * tvg_shape_new()
Creates a new shape object.
+TVG_EXPORT Tvg_Result tvg_shape_set_linear_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the linear gradient fill for all of the figures from the path.
+TVG_EXPORT Tvg_Result tvg_shape_append_circle(Tvg_Paint *paint, float cx, float cy, float rx, float ry)
Appends an ellipse to the path.
+TVG_EXPORT Tvg_Result tvg_radial_gradient_set(Tvg_Gradient *grad, float cx, float cy, float radius)
Sets the radial gradient bounds.
+TVG_EXPORT Tvg_Result tvg_linear_gradient_set(Tvg_Gradient *grad, float x1, float y1, float x2, float y2)
Sets the linear gradient bounds.
+struct _Tvg_Gradient Tvg_Gradient
A structure representing a gradient fill of a Tvg_Paint object.
Definition: thorvg_capi.h:69
+TVG_EXPORT Tvg_Gradient * tvg_linear_gradient_new()
Creates a new linear gradient object.
+A data structure storing the information about the color and its relative position inside the gradien...
Definition: thorvg_capi.h:184
+Tvg_Path_Command
Enumeration specifying the values of the path commands accepted by TVG.
Definition: thorvg_capi.h:127
+TVG_EXPORT Tvg_Result tvg_shape_set_radial_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the radial gradient fill for all of the figures from the path.
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Shape.map b/docs/html/group__ThorVGCapi__Shape.map
new file mode 100644
index 00000000..38550750
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Shape.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__Shape.md5 b/docs/html/group__ThorVGCapi__Shape.md5
new file mode 100644
index 00000000..f88e902a
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__Shape.md5
@@ -0,0 +1 @@
+93fb9188797dd82cf9eef43f77c609e2
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__Shape.png b/docs/html/group__ThorVGCapi__Shape.png
new file mode 100644
index 00000000..b5e5c9f6
Binary files /dev/null and b/docs/html/group__ThorVGCapi__Shape.png differ
diff --git a/docs/html/group__ThorVGCapi__SwCanvas.html b/docs/html/group__ThorVGCapi__SwCanvas.html
new file mode 100644
index 00000000..d23b8151
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__SwCanvas.html
@@ -0,0 +1,348 @@
+
+
+
+
+
+
+
+ThorVG: SwCanvas
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A module for rendering the graphical elements using the software engine.
+More...
+
+
+
+
+
A module for rendering the graphical elements using the software engine.
+
+
+
◆ Tvg_Colorspace
+
+
+
+
+
Enumeration specifying the methods of combining the 8-bit color channels into 32-bit color.
+
+Enumerator TVG_COLORSPACE_ABGR8888 The 8-bit color channels are combined into 32-bit color in the order: alpha, blue, green, red.
+
+ TVG_COLORSPACE_ARGB8888 The 8-bit color channels are combined into 32-bit color in the order: alpha, red, green, blue.
+
+
+
+
+
+
+
◆ Tvg_Mempool_Policy
+
+
+
+
+
Enumeration specifying the methods of Memory Pool behavior policy.
+
+Enumerator TVG_MEMPOOL_POLICY_DEFAULT Default behavior that ThorVG is designed to.
+
+ TVG_MEMPOOL_POLICY_SHAREABLE Memory Pool is shared among canvases.
+
+ TVG_MEMPOOL_POLICY_INDIVIDUAL Allocate designated memory pool that is used only by the current canvas instance.
+
+
+
+
+
+
+
+
◆ tvg_swcanvas_create()
+
+
+
+
+
+ TVG_EXPORT Tvg_Canvas * tvg_swcanvas_create
+ (
+ )
+
+
+
+
+
+
Creates a Canvas object.
+
+
+
+
+
+
+
uint32_t *buffer = NULL;
+
buffer = (uint32_t*) malloc(sizeof (uint32_t) * 100 * 100);
+
if (!buffer) return ;
+
+
+
+
+
+
+
+
Returns A new Tvg_Canvas object.
+
+
+
+
+
◆ tvg_swcanvas_set_mempool()
+
+
+
+
+
Sets the software engine memory pool behavior policy.
+
ThorVG draws a lot of shapes, it allocates/deallocates a few chunk of memory while processing rendering. It internally uses one shared memory pool which can be reused among the canvases in order to avoid memory overhead.
+
Thus ThorVG suggests using a memory pool policy to satisfy user demands, if it needs to guarantee the thread-safety of the internal data access.
+
Parameters
+
+ [in] canvas The Tvg_Canvas object of which the Memory Pool behavior is to be specified.
+ [in] policy The method specifying the Memory Pool behavior. The default value is TVG_MEMPOOL_POLICY_DEFAULT
.
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_INVALID_ARGUMENTS An invalid canvas pointer passed.
+ TVG_RESULT_INSUFFICIENT_CONDITION The canvas contains some paints already.
+ TVG_RESULT_NOT_SUPPORTED The software engine is not supported.
+
+
+
+
Note When policy
is set as TVG_MEMPOOL_POLICY_INDIVIDUAL
, the current instance of canvas uses its own individual memory data, which is not shared with others. This is necessary when the canvas is accessed on a worker-thread.
+
Warning It's not allowed after pushing any paints.
+
+
+
+
+
◆ tvg_swcanvas_set_target()
+
+
+
+
+
+ TVG_EXPORT Tvg_Result tvg_swcanvas_set_target
+ (
+ Tvg_Canvas *
+ canvas ,
+
+
+
+
+ uint32_t *
+ buffer ,
+
+
+
+
+ uint32_t
+ stride ,
+
+
+
+
+ uint32_t
+ w ,
+
+
+
+
+ uint32_t
+ h ,
+
+
+
+
+ Tvg_Colorspace
+ 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.
+
Parameters
+
+ [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_COLORSPACE_ABGR8888
+TVG_COLORSPACE_ARGB8888
+
+
+
+
+
+
Returns Tvg_Result enumeration.
+
Return values
+
+ TVG_RESULT_SUCCESS Succeed.
+ TVG_RESULT_MEMORY_CORRUPTION Casting in the internal function implementation failed.
+ TVG_RESULT_INVALID_ARGUMENTS An invalid canvas or buffer pointer passed or one of the stride
, w
or h
being zero.
+ TVG_RESULT_NOT_SUPPORTED The software engine is not supported.
+
+
+
+
Warning Do not access buffer
during tvg_canvas_draw() - tvg_canvas_sync() . It should not be accessed while TVG is writing on it.
+
See also Tvg_Colorspace
+
+
+
+
+TVG_EXPORT Tvg_Result tvg_swcanvas_set_target(Tvg_Canvas *canvas, uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h, Tvg_Colorspace cs)
Sets the buffer used in the rasterization process and defines the used colorspace.
+@ TVG_ENGINE_SW
CPU rasterizer.
Definition: thorvg_capi.h:84
+struct _Tvg_Canvas Tvg_Canvas
A structure responsible for managing and drawing graphical elements.
Definition: thorvg_capi.h:55
+TVG_EXPORT Tvg_Canvas * tvg_swcanvas_create()
Creates a Canvas object.
+TVG_EXPORT Tvg_Result tvg_engine_init(Tvg_Engine engine_method, unsigned threads)
Initializes TVG engines.
+@ TVG_COLORSPACE_ARGB8888
The 8-bit color channels are combined into 32-bit color in the order: alpha, red, green,...
Definition: thorvg_capi.h:332
+TVG_EXPORT Tvg_Result tvg_canvas_destroy(Tvg_Canvas *canvas)
Clears the canvas internal data, releases all paints stored by the canvas and destroys the canvas obj...
+TVG_EXPORT Tvg_Result tvg_engine_term(Tvg_Engine engine_method)
Terminates TVG engines.
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__SwCanvas.map b/docs/html/group__ThorVGCapi__SwCanvas.map
new file mode 100644
index 00000000..44abe203
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__SwCanvas.map
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/docs/html/group__ThorVGCapi__SwCanvas.md5 b/docs/html/group__ThorVGCapi__SwCanvas.md5
new file mode 100644
index 00000000..9fe95739
--- /dev/null
+++ b/docs/html/group__ThorVGCapi__SwCanvas.md5
@@ -0,0 +1 @@
+e70d73e8d9dd6b80d0ad936d7886cbf0
\ No newline at end of file
diff --git a/docs/html/group__ThorVGCapi__SwCanvas.png b/docs/html/group__ThorVGCapi__SwCanvas.png
new file mode 100644
index 00000000..162d5d82
Binary files /dev/null and b/docs/html/group__ThorVGCapi__SwCanvas.png differ
diff --git a/docs/html/group__ThorVG__CAPI.html b/docs/html/group__ThorVG__CAPI.html
new file mode 100644
index 00000000..19316efd
--- /dev/null
+++ b/docs/html/group__ThorVG__CAPI.html
@@ -0,0 +1,243 @@
+
+
+
+
+
+
+
+ThorVG: ThorVG_CAPI
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ThorVG C language binding APIs.
+More...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Initializer
+ A module enabling initialization and termination of the TVG engines.
+
+ Canvas
+ A module for managing and drawing graphical elements.
+
+ Paint
+ A module for managing graphical elements. It enables duplication, transformation and composition.
+
+ Shape
+ A module for managing two-dimensional figures and their properties.
+
+ Gradient
+ A module managing the gradient fill of objects.
+
+ Picture
+ A module enabling to create and to load an image in one of the supported formats: svg, png, jpg and raw.
+
+ Scene
+ A module managing the multiple paints as one group paint.
+
+ Saver
+ A module for exporting a paint object into a specified file.
+
+
+
+struct Tvg_Point
+ A data structure representing a point in two-dimensional space. More...
+
+struct Tvg_Matrix
+ A data structure representing a three-dimensional matrix. More...
+
+
+
+typedef struct _Tvg_Canvas Tvg_Canvas
+ A structure responsible for managing and drawing graphical elements. More...
+
+typedef struct _Tvg_Paint Tvg_Paint
+ A structure representing a graphical element. More...
+
+
+typedef struct _Tvg_Gradient Tvg_Gradient
+ A structure representing a gradient fill of a Tvg_Paint object.
+
+
+typedef struct _Tvg_Saver Tvg_Saver
+ A structure representing an object that enables to save a Tvg_Paint object into a file.
+
+
+
+
ThorVG C language binding APIs.
+
+
+
◆ Tvg_Canvas
+
+
+
+
+
A structure responsible for managing and drawing graphical elements.
+
It sets up the target buffer, which can be drawn on the screen. It stores the Tvg_Paint objects (Shape, Scene, Picture).
+
+
+
+
+
◆ Tvg_Paint
+
+
+
+
+
A structure representing a graphical element.
+
Warning The TvgPaint objects can not be shared between Canvases.
+
+
+
+
+
+
◆ Tvg_Result
+
+
+
+
+
Enumeration specifying the result from the APIs.
+
+Enumerator TVG_RESULT_SUCCESS The value returned in case of a correct request execution.
+
+ TVG_RESULT_INVALID_ARGUMENT The value returned in the event of a problem with the arguments given to the API - e.g. empty paths or null pointers.
+
+ TVG_RESULT_INSUFFICIENT_CONDITION The value returned in case the request cannot be processed - e.g. asking for properties of an object, which does not exist.
+
+ TVG_RESULT_FAILED_ALLOCATION The value returned in case of unsuccessful memory allocation.
+
+ TVG_RESULT_MEMORY_CORRUPTION The value returned in the event of bad memory handling - e.g. failing in pointer releasing or casting.
+
+ TVG_RESULT_NOT_SUPPORTED The value returned in case of choosing unsupported options.
+
+ TVG_RESULT_UNKNOWN The value returned in all other cases.
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/group__ThorVG__CAPI.map b/docs/html/group__ThorVG__CAPI.map
new file mode 100644
index 00000000..b6ce4eb0
--- /dev/null
+++ b/docs/html/group__ThorVG__CAPI.map
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/group__ThorVG__CAPI.md5 b/docs/html/group__ThorVG__CAPI.md5
new file mode 100644
index 00000000..15217e6e
--- /dev/null
+++ b/docs/html/group__ThorVG__CAPI.md5
@@ -0,0 +1 @@
+a966acf3060b11ff6d68f2ee487724f0
\ No newline at end of file
diff --git a/docs/html/group__ThorVG__CAPI.png b/docs/html/group__ThorVG__CAPI.png
new file mode 100644
index 00000000..9e62c796
Binary files /dev/null and b/docs/html/group__ThorVG__CAPI.png differ
diff --git a/docs/html/inherit_graph_10.map b/docs/html/inherit_graph_10.map
new file mode 100644
index 00000000..6c71ea54
--- /dev/null
+++ b/docs/html/inherit_graph_10.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/docs/html/inherit_graph_10.md5 b/docs/html/inherit_graph_10.md5
new file mode 100644
index 00000000..38079774
--- /dev/null
+++ b/docs/html/inherit_graph_10.md5
@@ -0,0 +1 @@
+bfab543bc61da2a3de0b6ef6ee6848d8
\ No newline at end of file
diff --git a/docs/html/inherit_graph_10.png b/docs/html/inherit_graph_10.png
new file mode 100644
index 00000000..eccff56a
Binary files /dev/null and b/docs/html/inherit_graph_10.png differ
diff --git a/docs/html/inherit_graph_8.map b/docs/html/inherit_graph_8.map
new file mode 100644
index 00000000..a228fc32
--- /dev/null
+++ b/docs/html/inherit_graph_8.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/docs/html/inherit_graph_8.md5 b/docs/html/inherit_graph_8.md5
new file mode 100644
index 00000000..27689264
--- /dev/null
+++ b/docs/html/inherit_graph_8.md5
@@ -0,0 +1 @@
+f9729067204027e69c2f946a024377ad
\ No newline at end of file
diff --git a/docs/html/inherit_graph_8.png b/docs/html/inherit_graph_8.png
new file mode 100644
index 00000000..9e085909
Binary files /dev/null and b/docs/html/inherit_graph_8.png differ
diff --git a/docs/html/inherit_graph_9.map b/docs/html/inherit_graph_9.map
new file mode 100644
index 00000000..e52f6b8a
--- /dev/null
+++ b/docs/html/inherit_graph_9.map
@@ -0,0 +1,3 @@
+
+
+
diff --git a/docs/html/inherit_graph_9.md5 b/docs/html/inherit_graph_9.md5
new file mode 100644
index 00000000..bd1d7d34
--- /dev/null
+++ b/docs/html/inherit_graph_9.md5
@@ -0,0 +1 @@
+918e300129ef2b935b62e663b88c1a8f
\ No newline at end of file
diff --git a/docs/html/inherit_graph_9.png b/docs/html/inherit_graph_9.png
new file mode 100644
index 00000000..dc60df90
Binary files /dev/null and b/docs/html/inherit_graph_9.png differ
diff --git a/docs/html/search/classes_9.html b/docs/html/search/classes_9.html
new file mode 100644
index 00000000..86cad046
--- /dev/null
+++ b/docs/html/search/classes_9.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/classes_9.js b/docs/html/search/classes_9.js
new file mode 100644
index 00000000..f29400d3
--- /dev/null
+++ b/docs/html/search/classes_9.js
@@ -0,0 +1,6 @@
+var searchData=
+[
+ ['tvg_5fcolor_5fstop_269',['Tvg_Color_Stop',['../structTvg__Color__Stop.html',1,'']]],
+ ['tvg_5fmatrix_270',['Tvg_Matrix',['../structTvg__Matrix.html',1,'']]],
+ ['tvg_5fpoint_271',['Tvg_Point',['../structTvg__Point.html',1,'']]]
+];
diff --git a/docs/html/search/enums_6.html b/docs/html/search/enums_6.html
new file mode 100644
index 00000000..7dd141e9
--- /dev/null
+++ b/docs/html/search/enums_6.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/enums_6.js b/docs/html/search/enums_6.js
new file mode 100644
index 00000000..854bc9ed
--- /dev/null
+++ b/docs/html/search/enums_6.js
@@ -0,0 +1,13 @@
+var searchData=
+[
+ ['tvg_5fcolorspace_427',['Tvg_Colorspace',['../group__ThorVGCapi__SwCanvas.html#gae038f89e569d85c0896711a0a31b4a78',1,'thorvg_capi.h']]],
+ ['tvg_5fcomposite_5fmethod_428',['Tvg_Composite_Method',['../group__ThorVGCapi__Paint.html#ga1ec9193ca6959f9d91a80cc61cd0df3a',1,'thorvg_capi.h']]],
+ ['tvg_5fengine_429',['Tvg_Engine',['../group__ThorVGCapi__Initializer.html#gaa61c2088915fc211ac91ffafaf45f695',1,'thorvg_capi.h']]],
+ ['tvg_5ffill_5frule_430',['Tvg_Fill_Rule',['../group__ThorVGCapi__Shape.html#gaffafa3cd9dc4bc90a7ef3c763add2695',1,'thorvg_capi.h']]],
+ ['tvg_5fmempool_5fpolicy_431',['Tvg_Mempool_Policy',['../group__ThorVGCapi__SwCanvas.html#gae63c2c2eee33be6410d3c8a013067b47',1,'thorvg_capi.h']]],
+ ['tvg_5fpath_5fcommand_432',['Tvg_Path_Command',['../group__ThorVGCapi__Shape.html#ga08e05d64247332603a624cea6597be77',1,'thorvg_capi.h']]],
+ ['tvg_5fresult_433',['Tvg_Result',['../group__ThorVG__CAPI.html#gad980f552658dcbbe42a0168f35c27781',1,'thorvg_capi.h']]],
+ ['tvg_5fstroke_5fcap_434',['Tvg_Stroke_Cap',['../group__ThorVGCapi__Shape.html#ga3bcc39b01d899a7e82a6c939740208d3',1,'thorvg_capi.h']]],
+ ['tvg_5fstroke_5ffill_435',['Tvg_Stroke_Fill',['../group__ThorVGCapi__Shape.html#ga9ac44e712782a9b2a5a36a49b2ae52c7',1,'thorvg_capi.h']]],
+ ['tvg_5fstroke_5fjoin_436',['Tvg_Stroke_Join',['../group__ThorVGCapi__Shape.html#gaf2cbac2c9164a782b96a8cd94f32e1ed',1,'thorvg_capi.h']]]
+];
diff --git a/docs/html/search/enumvalues_10.html b/docs/html/search/enumvalues_10.html
new file mode 100644
index 00000000..7107c3d7
--- /dev/null
+++ b/docs/html/search/enumvalues_10.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/enumvalues_10.js b/docs/html/search/enumvalues_10.js
new file mode 100644
index 00000000..e43b037a
--- /dev/null
+++ b/docs/html/search/enumvalues_10.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['winding_503',['Winding',['../group__ThorVG.html#gga9a534b0377c9ca41983d53b0dae0d5a4a268b61c62382fc1f9ca5cf52a4fece32',1,'tvg']]]
+];
diff --git a/docs/html/search/groups_1.html b/docs/html/search/groups_1.html
new file mode 100644
index 00000000..aa06d658
--- /dev/null
+++ b/docs/html/search/groups_1.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/groups_1.js b/docs/html/search/groups_1.js
new file mode 100644
index 00000000..ffd03767
--- /dev/null
+++ b/docs/html/search/groups_1.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['gradient_505',['Gradient',['../group__ThorVGCapi__Gradient.html',1,'']]]
+];
diff --git a/docs/html/search/groups_2.html b/docs/html/search/groups_2.html
new file mode 100644
index 00000000..a205d30d
--- /dev/null
+++ b/docs/html/search/groups_2.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/groups_2.js b/docs/html/search/groups_2.js
new file mode 100644
index 00000000..ee2398b9
--- /dev/null
+++ b/docs/html/search/groups_2.js
@@ -0,0 +1,4 @@
+var searchData=
+[
+ ['initializer_506',['Initializer',['../group__ThorVGCapi__Initializer.html',1,'']]]
+];
diff --git a/docs/html/search/groups_3.html b/docs/html/search/groups_3.html
new file mode 100644
index 00000000..4255bed4
--- /dev/null
+++ b/docs/html/search/groups_3.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/groups_3.js b/docs/html/search/groups_3.js
new file mode 100644
index 00000000..f71d5168
--- /dev/null
+++ b/docs/html/search/groups_3.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['paint_507',['Paint',['../group__ThorVGCapi__Paint.html',1,'']]],
+ ['picture_508',['Picture',['../group__ThorVGCapi__Picture.html',1,'']]]
+];
diff --git a/docs/html/search/groups_4.html b/docs/html/search/groups_4.html
new file mode 100644
index 00000000..8644fbe7
--- /dev/null
+++ b/docs/html/search/groups_4.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/groups_4.js b/docs/html/search/groups_4.js
new file mode 100644
index 00000000..e3d9a1b4
--- /dev/null
+++ b/docs/html/search/groups_4.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['saver_509',['Saver',['../group__ThorVGCapi__Saver.html',1,'']]],
+ ['scene_510',['Scene',['../group__ThorVGCapi__Scene.html',1,'']]],
+ ['shape_511',['Shape',['../group__ThorVGCapi__Shape.html',1,'']]],
+ ['swcanvas_512',['SwCanvas',['../group__ThorVGCapi__SwCanvas.html',1,'']]]
+];
diff --git a/docs/html/search/groups_5.html b/docs/html/search/groups_5.html
new file mode 100644
index 00000000..1e9ba853
--- /dev/null
+++ b/docs/html/search/groups_5.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/groups_5.js b/docs/html/search/groups_5.js
new file mode 100644
index 00000000..1409cef0
--- /dev/null
+++ b/docs/html/search/groups_5.js
@@ -0,0 +1,5 @@
+var searchData=
+[
+ ['thorvg_513',['ThorVG',['../group__ThorVG.html',1,'']]],
+ ['thorvg_5fcapi_514',['ThorVG_CAPI',['../group__ThorVG__CAPI.html',1,'']]]
+];
diff --git a/docs/html/search/typedefs_0.html b/docs/html/search/typedefs_0.html
new file mode 100644
index 00000000..376db479
--- /dev/null
+++ b/docs/html/search/typedefs_0.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
Loading...
+
+
+
Searching...
+
No Matches
+
+
+
+
diff --git a/docs/html/search/typedefs_0.js b/docs/html/search/typedefs_0.js
new file mode 100644
index 00000000..373a51e6
--- /dev/null
+++ b/docs/html/search/typedefs_0.js
@@ -0,0 +1,7 @@
+var searchData=
+[
+ ['tvg_5fcanvas_413',['Tvg_Canvas',['../group__ThorVG__CAPI.html#ga5f10c1f3dabdc9287166611c7fe5fd8a',1,'thorvg_capi.h']]],
+ ['tvg_5fgradient_414',['Tvg_Gradient',['../group__ThorVG__CAPI.html#gafc8e0d01812127260d0753eceb056181',1,'thorvg_capi.h']]],
+ ['tvg_5fpaint_415',['Tvg_Paint',['../group__ThorVG__CAPI.html#ga98af7c3fe18afa8ad65ea6a6e097a292',1,'thorvg_capi.h']]],
+ ['tvg_5fsaver_416',['Tvg_Saver',['../group__ThorVG__CAPI.html#gac16750954e423565f6d143a66aa03b31',1,'thorvg_capi.h']]]
+];
diff --git a/docs/html/structTvg__Color__Stop-members.html b/docs/html/structTvg__Color__Stop-members.html
new file mode 100644
index 00000000..54ebffd0
--- /dev/null
+++ b/docs/html/structTvg__Color__Stop-members.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+ThorVG: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for Tvg_Color_Stop , including all inherited members.
+
+
+
+
+
diff --git a/docs/html/structTvg__Color__Stop.html b/docs/html/structTvg__Color__Stop.html
new file mode 100644
index 00000000..dcd41a36
--- /dev/null
+++ b/docs/html/structTvg__Color__Stop.html
@@ -0,0 +1,177 @@
+
+
+
+
+
+
+
+ThorVG: Tvg_Color_Stop
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A data structure storing the information about the color and its relative position inside the gradient bounds.
+ More...
+
+
+float offset
+
+uint8_t r
+
+uint8_t g
+
+uint8_t b
+
+uint8_t a
+
+
+
+
A data structure storing the information about the color and its relative position inside the gradient bounds.
+
+
+
+
+
+
+
The alpha channel value in the range [0 ~ 255], where 0 is completely transparent and 255 is opaque.
+
+
+
+
+
+
+
+
+
The blue color channel value in the range [0 ~ 255].
+
+
+
+
+
+
+
+
+
The green color channel value in the range [0 ~ 255].
+
+
+
+
+
◆ offset
+
+
+
+
The relative position of the color.
+
+
+
+
+
+
+
+
+
The red color channel value in the range [0 ~ 255].
+
+
+
+
+
+
+
+
diff --git a/docs/html/structTvg__Matrix-members.html b/docs/html/structTvg__Matrix-members.html
new file mode 100644
index 00000000..8de3ed79
--- /dev/null
+++ b/docs/html/structTvg__Matrix-members.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ThorVG: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for Tvg_Matrix , including all inherited members.
+
+
+
+
+
diff --git a/docs/html/structTvg__Matrix.html b/docs/html/structTvg__Matrix.html
new file mode 100644
index 00000000..9edc62b8
--- /dev/null
+++ b/docs/html/structTvg__Matrix.html
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
+ThorVG: Tvg_Matrix
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A data structure representing a three-dimensional matrix.
+ More...
+
+
A data structure representing a three-dimensional matrix.
+
The elements e11, e12, e21 and e22 represent the rotation matrix, including the scaling factor. The elements e13 and e23 determine the translation of the object along the x and y-axis, respectively. The elements e31 and e32 are set to 0, e33 is set to 1.
+
+
+
+
+
diff --git a/docs/html/structTvg__Point-members.html b/docs/html/structTvg__Point-members.html
new file mode 100644
index 00000000..f971c87e
--- /dev/null
+++ b/docs/html/structTvg__Point-members.html
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ThorVG: Member List
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This is the complete list of members for Tvg_Point , including all inherited members.
+
+
+
+
+
diff --git a/docs/html/structTvg__Point.html b/docs/html/structTvg__Point.html
new file mode 100644
index 00000000..73450752
--- /dev/null
+++ b/docs/html/structTvg__Point.html
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+ThorVG: Tvg_Point
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
A data structure representing a point in two-dimensional space.
+ More...
+
+
A data structure representing a point in two-dimensional space.
+
+
+
+
+
diff --git a/docs/html/thorvg__capi_8h_source.html b/docs/html/thorvg__capi_8h_source.html
new file mode 100644
index 00000000..431db4be
--- /dev/null
+++ b/docs/html/thorvg__capi_8h_source.html
@@ -0,0 +1,668 @@
+
+
+
+
+
+
+
+ThorVG: tmp/thorvg_capi.h Source File
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ThorVG
+ v0.6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
18 #ifndef __THORVG_CAPI_H__
+
19 #define __THORVG_CAPI_H__
+
+
+
+
+
+
+
+
+
+
+
30 #define TVG_EXPORT __declspec(dllexport)
+
+
32 #define TVG_EXPORT __attribute__ ((visibility ("default")))
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
2032 #endif //_THORVG_CAPI_H_
+
+TVG_EXPORT Tvg_Result tvg_paint_set_opacity(Tvg_Paint *paint, uint8_t opacity)
Sets the opacity of the given Tvg_Paint.
+TVG_EXPORT Tvg_Result tvg_paint_get_transform(Tvg_Paint *paint, Tvg_Matrix *m)
Gets the matrix of the affine transformation of the given Tvg_Paint object.
+TVG_EXPORT Tvg_Result tvg_shape_get_fill_rule(const Tvg_Paint *paint, Tvg_Fill_Rule *rule)
Gets the shape's fill rule.
+TVG_EXPORT Tvg_Result tvg_gradient_set_color_stops(Tvg_Gradient *grad, const Tvg_Color_Stop *color_stop, uint32_t cnt)
Sets the parameters of the colors of the gradient and their position.
+A data structure representing a three-dimensional matrix.
Definition: thorvg_capi.h:212
+TVG_EXPORT Tvg_Result tvg_scene_clear(Tvg_Paint *scene, bool free)
Clears a Tvg_Scene objects from pushed paints.
+TVG_EXPORT Tvg_Result tvg_shape_set_fill_color(Tvg_Paint *paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Sets the shape's solid color.
+TVG_EXPORT Tvg_Result tvg_gradient_get_spread(const Tvg_Gradient *grad, Tvg_Stroke_Fill *spread)
Gets the FillSpread value of the gradient object.
+TVG_EXPORT Tvg_Result tvg_scene_reserve(Tvg_Paint *scene, uint32_t size)
Sets the size of the container, where all the paints pushed into the scene are stored.
+TVG_EXPORT Tvg_Result tvg_paint_get_composite_method(const Tvg_Paint *paint, const Tvg_Paint **target, Tvg_Composite_Method *method)
Gets the composition target object and the composition method.
+@ TVG_FILL_RULE_WINDING
A line from the point to a location outside the shape is drawn. The intersections of the line with th...
Definition: thorvg_capi.h:169
+@ TVG_RESULT_FAILED_ALLOCATION
The value returned in case of unsuccessful memory allocation.
Definition: thorvg_capi.h:96
+TVG_EXPORT Tvg_Result tvg_shape_append_rect(Tvg_Paint *paint, float x, float y, float w, float h, float rx, float ry)
Appends a rectangle to the path.
+TVG_EXPORT Tvg_Result tvg_radial_gradient_get(Tvg_Gradient *grad, float *cx, float *cy, float *radius)
The function gets radial gradient center point ant radius.
+TVG_EXPORT Tvg_Result tvg_shape_get_path_coords(const Tvg_Paint *paint, const Tvg_Point **pts, uint32_t *cnt)
Gets the points values of the path.
+TVG_EXPORT Tvg_Result tvg_canvas_push(Tvg_Canvas *canvas, Tvg_Paint *paint)
Inserts a drawing element into the canvas using a Tvg_Paint object.
+TVG_EXPORT Tvg_Result tvg_swcanvas_set_target(Tvg_Canvas *canvas, uint32_t *buffer, uint32_t stride, uint32_t w, uint32_t h, Tvg_Colorspace cs)
Sets the buffer used in the rasterization process and defines the used colorspace.
+TVG_EXPORT Tvg_Gradient * tvg_radial_gradient_new()
Creates a new radial gradient object.
+struct _Tvg_Saver Tvg_Saver
A structure representing an object that enables to save a Tvg_Paint object into a file.
Definition: thorvg_capi.h:75
+TVG_EXPORT Tvg_Paint * tvg_paint_duplicate(Tvg_Paint *paint)
Duplicates the given Tvg_Paint object.
+TVG_EXPORT Tvg_Saver * tvg_saver_new()
Creates a new Tvg_Saver object.
+TVG_EXPORT Tvg_Result tvg_saver_sync(Tvg_Saver *saver)
Guarantees that the saving task is finished.
+TVG_EXPORT Tvg_Result tvg_shape_get_path_commands(const Tvg_Paint *paint, const Tvg_Path_Command **cmds, uint32_t *cnt)
Gets the commands data of the path.
+TVG_EXPORT Tvg_Result tvg_canvas_sync(Tvg_Canvas *canvas)
Guarantees that the drawing process is finished.
+TVG_EXPORT Tvg_Result tvg_shape_reset(Tvg_Paint *paint)
Resets the shape path properties.
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_radial_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the radial gradient fill of the stroke for all of the figures from the path.
+TVG_EXPORT Tvg_Result tvg_swcanvas_set_mempool(Tvg_Canvas *canvas, Tvg_Mempool_Policy policy)
Sets the software engine memory pool behavior policy.
+TVG_EXPORT Tvg_Result tvg_canvas_clear(Tvg_Canvas *canvas, bool free)
Sets the total number of the paints pushed into the canvas to be zero. Tvg_Paint objects stored in th...
+@ TVG_COMPOSITE_METHOD_ALPHA_MASK
The pixels of the source and the target are alpha blended. As a result, only the part of the source,...
Definition: thorvg_capi.h:111
+@ TVG_ENGINE_SW
CPU rasterizer.
Definition: thorvg_capi.h:84
+TVG_EXPORT Tvg_Result tvg_paint_del(Tvg_Paint *paint)
Releases the given Tvg_Paint object.
+uint8_t a
Definition: thorvg_capi.h:190
+TVG_EXPORT Tvg_Result tvg_paint_get_opacity(const Tvg_Paint *paint, uint8_t *opacity)
Gets the opacity of the given Tvg_Paint.
+Tvg_Composite_Method
Enumeration indicating the method used in the composition of two objects - the target and the source.
Definition: thorvg_capi.h:108
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_cap(Tvg_Paint *paint, Tvg_Stroke_Cap cap)
Sets the cap style used for stroking the path.
+struct _Tvg_Canvas Tvg_Canvas
A structure responsible for managing and drawing graphical elements.
Definition: thorvg_capi.h:55
+TVG_EXPORT Tvg_Result tvg_canvas_update(Tvg_Canvas *canvas)
Updates all paints in a canvas.
+TVG_EXPORT Tvg_Result tvg_gradient_set_spread(Tvg_Gradient *grad, const Tvg_Stroke_Fill spread)
Sets the Tvg_Stroke_Fill value, which specifies how to fill the area outside the gradient bounds.
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_join(Tvg_Paint *paint, Tvg_Stroke_Join join)
Sets the join style for stroked path segments.
+Tvg_Engine
Enumeration specifying the engine type used for the graphics backend. For multiple backends bitwise o...
Definition: thorvg_capi.h:83
+uint8_t r
Definition: thorvg_capi.h:187
+TVG_EXPORT Tvg_Result tvg_gradient_del(Tvg_Gradient *grad)
Deletes the given gradient object.
+TVG_EXPORT Tvg_Result tvg_canvas_draw(Tvg_Canvas *canvas)
Requests the canvas to draw the Tvg_Paint objects.
+Tvg_Mempool_Policy
Enumeration specifying the methods of Memory Pool behavior policy.
Definition: thorvg_capi.h:320
+@ TVG_STROKE_CAP_BUTT
The stroke ends exactly at each of the two endpoints of a sub-path. For zero length sub-paths no stro...
Definition: thorvg_capi.h:141
+TVG_EXPORT Tvg_Result tvg_picture_get_viewbox(const Tvg_Paint *paint, float *x, float *y, float *w, float *h)
Gets the position and the size of the loaded picture. (BETA_API)
+Tvg_Fill_Rule
Enumeration specifying the algorithm used to establish which parts of the shape are treated as the in...
Definition: thorvg_capi.h:168
+TVG_EXPORT Tvg_Result tvg_paint_translate(Tvg_Paint *paint, float x, float y)
Moves the given Tvg_Paint in a two-dimensional space.
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_color(const Tvg_Paint *paint, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
Gets the shape's stroke color.
+TVG_EXPORT Tvg_Result tvg_shape_set_fill_rule(Tvg_Paint *paint, Tvg_Fill_Rule rule)
Sets the shape's fill rule.
+TVG_EXPORT Tvg_Paint * tvg_scene_new()
Creates a new scene object.
+@ TVG_MEMPOOL_POLICY_SHAREABLE
Memory Pool is shared among canvases.
Definition: thorvg_capi.h:322
+A data structure representing a point in two-dimensional space.
Definition: thorvg_capi.h:199
+@ TVG_RESULT_UNKNOWN
The value returned in all other cases.
Definition: thorvg_capi.h:99
+@ TVG_PATH_COMMAND_LINE_TO
Draws a line from the current point to the given point and sets a new value of the current point - co...
Definition: thorvg_capi.h:130
+@ TVG_FILL_RULE_EVEN_ODD
A line from the point to a location outside the shape is drawn and its intersections with the path se...
Definition: thorvg_capi.h:170
+TVG_EXPORT Tvg_Canvas * tvg_swcanvas_create()
Creates a Canvas object.
+Tvg_Colorspace
Enumeration specifying the methods of combining the 8-bit color channels into 32-bit color.
Definition: thorvg_capi.h:330
+uint8_t g
Definition: thorvg_capi.h:188
+TVG_EXPORT Tvg_Paint * tvg_shape_new()
Creates a new shape object.
+TVG_EXPORT Tvg_Result tvg_engine_init(Tvg_Engine engine_method, unsigned threads)
Initializes TVG engines.
+TVG_EXPORT Tvg_Result tvg_shape_set_linear_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the linear gradient fill for all of the figures from the path.
+@ TVG_MEMPOOL_POLICY_DEFAULT
Default behavior that ThorVG is designed to.
Definition: thorvg_capi.h:321
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_cap(const Tvg_Paint *paint, Tvg_Stroke_Cap *cap)
Gets the stroke cap style used for stroking the path.
+TVG_EXPORT Tvg_Result tvg_shape_append_circle(Tvg_Paint *paint, float cx, float cy, float rx, float ry)
Appends an ellipse to the path.
+@ TVG_STROKE_JOIN_BEVEL
The outer corner of the joined path segments is bevelled at the join point. The triangular region of ...
Definition: thorvg_capi.h:149
+TVG_EXPORT Tvg_Result tvg_paint_scale(Tvg_Paint *paint, float factor)
Scales the given Tvg_Paint object by the given factor.
+TVG_EXPORT Tvg_Result tvg_picture_load(Tvg_Paint *paint, const char *path)
Loads a picture data directly from a file.
+TVG_EXPORT Tvg_Result tvg_scene_push(Tvg_Paint *scene, Tvg_Paint *paint)
Passes drawing elements to the scene using Tvg_Paint objects.
+TVG_EXPORT Tvg_Result tvg_radial_gradient_set(Tvg_Gradient *grad, float cx, float cy, float radius)
Sets the radial gradient bounds.
+@ TVG_ENGINE_GL
OpenGL rasterizer.
Definition: thorvg_capi.h:85
+@ TVG_MEMPOOL_POLICY_INDIVIDUAL
Allocate designated memory pool that is used only by the current canvas instance.
Definition: thorvg_capi.h:323
+TVG_EXPORT Tvg_Result tvg_linear_gradient_get(Tvg_Gradient *grad, float *x1, float *y1, float *x2, float *y2)
Gets the linear gradient bounds.
+Tvg_Result
Enumeration specifying the result from the APIs.
Definition: thorvg_capi.h:92
+@ TVG_STROKE_CAP_SQUARE
The stroke is extended in both endpoints of a sub-path by a rectangle, with the width equal to the st...
Definition: thorvg_capi.h:139
+TVG_EXPORT Tvg_Result tvg_shape_append_path(Tvg_Paint *paint, const Tvg_Path_Command *cmds, uint32_t cmdCnt, const Tvg_Point *pts, uint32_t ptsCnt)
Appends a given sub-path to the path.
+@ TVG_COMPOSITE_METHOD_NONE
No composition is applied.
Definition: thorvg_capi.h:109
+TVG_EXPORT Tvg_Result tvg_gradient_get_transform(const Tvg_Gradient *grad, Tvg_Matrix *m)
Gets the matrix of the affine transformation of the gradient object. (BETA_API)
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_width(const Tvg_Paint *paint, float *width)
Gets the shape's stroke width.
+TVG_EXPORT Tvg_Result tvg_picture_load_raw(Tvg_Paint *paint, uint32_t *data, uint32_t w, uint32_t h, bool copy)
Loads a picture data from a memory block of a given size. (BETA_API)
+@ TVG_COLORSPACE_ARGB8888
The 8-bit color channels are combined into 32-bit color in the order: alpha, red, green,...
Definition: thorvg_capi.h:332
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_dash(const Tvg_Paint *paint, const float **dashPattern, uint32_t *cnt)
Gets the dash pattern of the stroke.
+@ TVG_STROKE_FILL_REFLECT
The gradient pattern is reflected outside the gradient area until the expected region is filled.
Definition: thorvg_capi.h:160
+TVG_EXPORT Tvg_Result tvg_paint_set_transform(Tvg_Paint *paint, const Tvg_Matrix *m)
Transforms the given Tvg_Paint using the augmented transformation matrix.
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_linear_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the linear gradient fill of the stroke for all of the figures from the path.
+TVG_EXPORT Tvg_Result tvg_paint_set_composite_method(Tvg_Paint *paint, Tvg_Paint *target, Tvg_Composite_Method method)
Sets the composition target object and the composition method.
+TVG_EXPORT Tvg_Result tvg_shape_get_fill_color(const Tvg_Paint *paint, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
Gets the shape's solid color.
+@ TVG_RESULT_NOT_SUPPORTED
The value returned in case of choosing unsupported options.
Definition: thorvg_capi.h:98
+TVG_EXPORT Tvg_Result tvg_shape_line_to(Tvg_Paint *paint, float x, float y)
Adds a new point to the sub-path, which results in drawing a line from the current point to the given...
+@ TVG_COMPOSITE_METHOD_CLIP_PATH
The intersection of the source and the target is determined and only the resulting pixels from the so...
Definition: thorvg_capi.h:110
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_dash(Tvg_Paint *paint, const float *dashPattern, uint32_t cnt)
Sets the shape's stroke dash pattern.
+TVG_EXPORT Tvg_Gradient * tvg_gradient_duplicate(Tvg_Gradient *grad)
Duplicates the given Tvg_Gradient object.
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_join(const Tvg_Paint *paint, Tvg_Stroke_Join *join)
The function gets the stroke join method.
+Tvg_Stroke_Cap
Enumeration determining the ending type of a stroke in the open sub-paths.
Definition: thorvg_capi.h:138
+@ TVG_PATH_COMMAND_CLOSE
Ends the current sub-path and connects it with its initial point - corresponds to Z command in the sv...
Definition: thorvg_capi.h:128
+@ TVG_COLORSPACE_ABGR8888
The 8-bit color channels are combined into 32-bit color in the order: alpha, blue,...
Definition: thorvg_capi.h:331
+Tvg_Stroke_Fill
Enumeration specifying how to fill the area outside the gradient bounds.
Definition: thorvg_capi.h:158
+TVG_EXPORT Tvg_Result tvg_paint_rotate(Tvg_Paint *paint, float degree)
Rotates the given Tvg_Paint by the given angle.
+TVG_EXPORT Tvg_Result tvg_linear_gradient_set(Tvg_Gradient *grad, float x1, float y1, float x2, float y2)
Sets the linear gradient bounds.
+float offset
Definition: thorvg_capi.h:186
+TVG_EXPORT Tvg_Result tvg_picture_get_size(const Tvg_Paint *paint, float *w, float *h)
Gets the size of the loaded picture.
+struct _Tvg_Gradient Tvg_Gradient
A structure representing a gradient fill of a Tvg_Paint object.
Definition: thorvg_capi.h:69
+@ TVG_STROKE_FILL_REPEAT
The gradient pattern is repeated continuously beyond the gradient area until the expected region is f...
Definition: thorvg_capi.h:161
+@ TVG_RESULT_SUCCESS
The value returned in case of a correct request execution.
Definition: thorvg_capi.h:93
+struct _Tvg_Paint Tvg_Paint
A structure representing a graphical element.
Definition: thorvg_capi.h:63
+TVG_EXPORT Tvg_Gradient * tvg_linear_gradient_new()
Creates a new linear gradient object.
+TVG_EXPORT Tvg_Result tvg_canvas_destroy(Tvg_Canvas *canvas)
Clears the canvas internal data, releases all paints stored by the canvas and destroys the canvas obj...
+@ TVG_RESULT_INSUFFICIENT_CONDITION
The value returned in case the request cannot be processed - e.g. asking for properties of an object,...
Definition: thorvg_capi.h:95
+TVG_EXPORT Tvg_Result tvg_shape_cubic_to(Tvg_Paint *paint, float cx1, float cy1, float cx2, float cy2, float x, float y)
Adds new points to the sub-path, which results in drawing a cubic Bezier curve.
+TVG_EXPORT Tvg_Result tvg_saver_del(Tvg_Saver *saver)
Deletes the given Tvg_Saver object.
+@ TVG_STROKE_FILL_PAD
The remaining area is filled with the closest stop color.
Definition: thorvg_capi.h:159
+TVG_EXPORT Tvg_Result tvg_gradient_set_transform(Tvg_Gradient *grad, const Tvg_Matrix *m)
Sets the matrix of the affine transformation for the gradient object. (BETA_API)
+A data structure storing the information about the color and its relative position inside the gradien...
Definition: thorvg_capi.h:184
+TVG_EXPORT Tvg_Result tvg_shape_close(Tvg_Paint *paint)
Closes the current sub-path by drawing a line from the current point to the initial point of the sub-...
+Tvg_Stroke_Join
Enumeration specifying how to fill the area outside the gradient bounds.
Definition: thorvg_capi.h:148
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_width(Tvg_Paint *paint, float width)
Sets the stroke width for all of the figures from the paint.
+TVG_EXPORT Tvg_Result tvg_gradient_get_color_stops(const Tvg_Gradient *grad, const Tvg_Color_Stop **color_stop, uint32_t *cnt)
Gets the parameters of the colors of the gradient, their position and number.
+uint8_t b
Definition: thorvg_capi.h:189
+@ TVG_PATH_COMMAND_MOVE_TO
Sets a new initial point of the sub-path and a new current point - corresponds to M command in the sv...
Definition: thorvg_capi.h:129
+TVG_EXPORT Tvg_Result tvg_shape_move_to(Tvg_Paint *paint, float x, float y)
Sets the initial point of the sub-path.
+@ TVG_PATH_COMMAND_CUBIC_TO
Draws a cubic Bezier curve from the current point to the given point using two given control points a...
Definition: thorvg_capi.h:131
+@ TVG_STROKE_CAP_ROUND
The stroke is extended in both endpoints of a sub-path by a half circle, with a radius equal to the h...
Definition: thorvg_capi.h:140
+TVG_EXPORT Tvg_Result tvg_shape_set_stroke_color(Tvg_Paint *paint, uint8_t r, uint8_t g, uint8_t b, uint8_t a)
Sets the shape's stroke color.
+TVG_EXPORT Tvg_Paint * tvg_picture_new()
Creates a new picture object.
+TVG_EXPORT Tvg_Result tvg_engine_term(Tvg_Engine engine_method)
Terminates TVG engines.
+TVG_EXPORT Tvg_Result tvg_shape_get_stroke_gradient(const Tvg_Paint *paint, Tvg_Gradient **grad)
Gets the gradient fill of the shape's stroke.
+@ TVG_STROKE_JOIN_MITER
The outer corner of the joined path segments is spiked. The spike is created by extension beyond the ...
Definition: thorvg_capi.h:151
+TVG_EXPORT Tvg_Result tvg_picture_set_size(Tvg_Paint *paint, float w, float h)
Resizes the picture content to the given width and height.
+Tvg_Path_Command
Enumeration specifying the values of the path commands accepted by TVG.
Definition: thorvg_capi.h:127
+@ TVG_STROKE_JOIN_ROUND
The outer corner of the joined path segments is rounded. The circular region is centered at the join ...
Definition: thorvg_capi.h:150
+TVG_EXPORT Tvg_Result tvg_picture_load_data(Tvg_Paint *paint, const char *data, uint32_t size, const char *mimetype, bool copy)
Loads a picture data from a memory block of a given size.
+TVG_EXPORT Tvg_Result tvg_shape_append_arc(Tvg_Paint *paint, float cx, float cy, float radius, float startAngle, float sweep, uint8_t pie)
Appends a circular arc to the path.
+TVG_EXPORT Tvg_Result tvg_shape_set_radial_gradient(Tvg_Paint *paint, Tvg_Gradient *grad)
Sets the radial gradient fill for all of the figures from the path.
+TVG_EXPORT Tvg_Result tvg_canvas_update_paint(Tvg_Canvas *canvas, Tvg_Paint *paint)
Updates the given Tvg_Paint object from the canvas before the rendering.
+TVG_EXPORT Tvg_Result tvg_saver_save(Tvg_Saver *saver, Tvg_Paint *paint, const char *path, bool compress)
Exports the given paint data to the given path.
+@ TVG_RESULT_INVALID_ARGUMENT
The value returned in the event of a problem with the arguments given to the API - e....
Definition: thorvg_capi.h:94
+TVG_EXPORT Tvg_Result tvg_canvas_reserve(Tvg_Canvas *canvas, uint32_t n)
Reserves a memory block where the objects pushed into a canvas are stored.
+TVG_EXPORT Tvg_Result tvg_paint_get_bounds(const Tvg_Paint *paint, float *x, float *y, float *w, float *h, bool transformed)
Gets the axis-aligned bounding box of the Tvg_Paint object. (BETA_API)
+@ TVG_COMPOSITE_METHOD_INVERSE_ALPHA_MASK
The pixels of the source and the complement to the target's pixels are alpha blended....
Definition: thorvg_capi.h:112
+TVG_EXPORT Tvg_Result tvg_shape_get_gradient(const Tvg_Paint *paint, Tvg_Gradient **grad)
Gets the gradient fill of the shape.
+@ TVG_RESULT_MEMORY_CORRUPTION
The value returned in the event of bad memory handling - e.g. failing in pointer releasing or casting...
Definition: thorvg_capi.h:97
+
+
+
+