Commit graph

13 commits

Author SHA1 Message Date
Hermet Park
0e97d21752 common canvas: Alter the concept of the Canvas::clear() API.
We've changed the behavior of Canvas::clear(false).

The canvas::clear(false) now retains the paints, allowing the user to update the next frame
more easily without having to recompose the paint list.

Previously, clear(false) removed the paint list from the canvas,
requiring the user to re-push all of them in the next frame.

Now, we offer the Canvas::paints() API, allowing users to modify the paint list directly instead.

This change will break compatibility with previous versions of Canvas.

Therefore, this update is included in ThorVG 1.0.

@Issue: https://github.com/thorvg/thorvg/issues/1372
2023-08-02 17:23:53 +09:00
Hermet Park
b214fd23bc common canvas/scene: introduce paints() api that returns the list of the paints.
These new apis would enable users to easily modify the motion scene,
The data structure of the paints has been changed from an array to a list.

@APIs:
std::list<Paint*>& Canvas::paints() noexcept;
std::list<Paint*>& Scene::paints() noexcept;

@Deprecated:
Result Canvas::reserve(uint32_t size) noexcept;
Result Scene::reserve(uint32_t size) noexcept;

@Issue: https://github.com/thorvg/thorvg/issues/1203
2023-06-09 10:54:03 +09:00
Mira Grudzinska
dbca656ff5 tests capi: missing header added
Because of this tests for SwCanvas were
not performed.
2023-04-23 10:25:55 +09:00
Hermet Park
f0ae3e9cee test: fix broken plugin support.
The thorvg test should not attempt to perform features
that were not enabled, as this will cause them to fail.

@Issues: https://github.com/thorvg/thorvg/issues/1251
2023-04-06 19:47:10 +09:00
Hermet Park
9b3c34c3b1 updated copyright. 2023-01-14 13:48:11 +09:00
Hermet Park
f0141e63de updated copyright date. 2022-01-12 14:08:48 +09:00
JunsuChoi
80cc0177fb test capiSwCanvas: remove a invalid test case.
This test depends on the machine environment.
it's not guaranteed the same result so we remove it.
2021-11-22 13:29:07 +09:00
Mira Grudzinska
8608238343 tests: capi - buffer was not freed 2021-11-08 12:27:23 +09:00
Mira Grudzinska
e6debdbf15
capi: tvg_swcanvas_set_mempool capi added (#903)
* capi: tvg_swcanvas_set_mempool capi added

* tests: tvg_swcanvas_set_mempool added to the tests
2021-10-13 19:31:39 +09:00
Michal Maciola
58ad09a07a
test capi: added missing canvas, paint and shape tests
Added tests for tvg_canvas_reserve, tvg_canvas_update_paint, tvg_paint_duplicate, tvg_paint_set_composite_method, tvg_shape_cubic_to, tvg_shape_close
2021-07-16 00:34:54 +09:00
Michal Maciola
858de0febb utc capi: added capiSwCanvas test cases 2021-06-16 20:48:15 +09:00
Hermet Park
c19aa9fed7 tset capi: code refactoring.
revise coding style.
2021-06-16 12:53:26 +09:00
Hermet Park
fe493a93f2 test capi: fix build infrastructure 2021-06-16 12:22:08 +09:00
Renamed from test/capi/testSwCanvas.cpp (Browse further)