mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
![]() Scene::clear() API allows users to remove shapes on their own, without a crash in paint->dispose() or tvg_paint_del() methods. This case is needed especially when thorvg is used to draw frames, when in one frame we have scene with shape, and in next frames (future time stamps) user deletes shapes @API additions Result Scene::clear(); Tvg_Result tvg_scene_clear(Tvg_Paint *scene); Example: ```c Tvg_Paint *scene = tvg_scene_new(); Tvg_Paint *shape = tvg_shape_new(); tvg_scene_push(scene, shape); tvg_scene_clear(); //Now we can safelly free resources manually tvg_paint_del(scene); //Without tvg_scene_clear() memory allocatad for shape was double released tvg_paint_del(shape); ``` |
||
---|---|---|
.. | ||
meson.build | ||
thorvg.h | ||
thorvg_capi.h |