mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +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> |
||
---|---|---|
.. | ||
svgs | ||
Arc.cpp | ||
Async.cpp | ||
Blending.cpp | ||
Boundary.cpp | ||
Capi.cpp | ||
ClipPath.cpp | ||
Common.h | ||
CustomTransform.cpp | ||
DirectUpdate.cpp | ||
Duplicate.cpp | ||
FillRule.cpp | ||
GradientTransform.cpp | ||
LinearGradient.cpp | ||
meson.build | ||
MultiCanvas.cpp | ||
MultiShapes.cpp | ||
Opacity.cpp | ||
Path.cpp | ||
PathCopy.cpp | ||
RadialGradient.cpp | ||
Scene.cpp | ||
SceneTransform.cpp | ||
Shape.cpp | ||
Stacking.cpp | ||
Stress.cpp | ||
Stroke.cpp | ||
StrokeLine.cpp | ||
Svg.cpp | ||
Svg2.cpp | ||
Transform.cpp | ||
Update.cpp |