Michal Szczecinski
d1d54e8b8f
capi examples: Added scene API C bindings.
...
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>
2020-11-10 12:13:48 +09:00