mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
![]() Scene CAPI allows to use scene functionaliy in C applications such as set opacity to few shapes at one time or implement transparent layers. @API Additions: ```c Tvg_Paint* tvg_scene_new(); Tvg_Result tvg_scene_reserve(Tvg_Paint* scene, uint32_t size); Tvg_Result tvg_scene_push(Tvg_Paint* scene, Tvg_Paint *paint); ``` Examples: ```c Tvg_Paint *scene = tvg_scene_new(); Tvg_Paint *shape1 = tvg_shape_new(); tvg_shape_append_rect(shape1, 10, 10, 100, 100, 0, 0); tvg_shape_set_fill_color(shape1, 255, 0, 0, 255); Tvg_Paint *shape2 = tvg_shape_new(); tvg_shape_append_rect(shape2, 120, 10, 100, 100, 0, 0); tvg_shape_set_fill_color(shape2, 255, 0, 0, 255); tvg_scene_push(scene, shape1); tvg_scene_push(scene, shape2); tvg_paint_set_opacity(scene, 100); tvg_canvas_push(canvas, scene); ``` Co-authored-by: Michal Szczecinski <m.szczecinsk@partner.samsung.com> |
||
---|---|---|
.. | ||
meson.build | ||
thorvg.h | ||
thorvg_capi.h |