mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-09 14:13:43 +00:00
example/capi: remove saver test.
This generated tvg often make us confused when Tvg example doesn't show it properly. It's too small circle.
This commit is contained in:
parent
d3c60955fa
commit
226c468f72
1 changed files with 1 additions and 26 deletions
|
@ -201,32 +201,7 @@ void testCapi()
|
||||||
tvg_canvas_push(canvas, pict);
|
tvg_canvas_push(canvas, pict);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////6. Save a paint
|
//////6. Animation with a picture
|
||||||
//Create a shape
|
|
||||||
Tvg_Paint* shape = tvg_shape_new();
|
|
||||||
tvg_shape_append_circle(shape, 420.0f, 420.0f, 10.0f, 10.0f);
|
|
||||||
tvg_shape_set_fill_color(shape, 0, 255, 0, 200);
|
|
||||||
|
|
||||||
//Save the shape
|
|
||||||
Tvg_Saver* saver = tvg_saver_new();
|
|
||||||
if (tvg_saver_save(saver, shape, EXAMPLE_DIR"/capi_test.tvg", true) != TVG_RESULT_SUCCESS) {
|
|
||||||
printf("Problem with saving a tvg file\n");
|
|
||||||
} else {
|
|
||||||
tvg_saver_sync(saver);
|
|
||||||
}
|
|
||||||
tvg_saver_del(saver);
|
|
||||||
|
|
||||||
//Load the saved paint
|
|
||||||
Tvg_Paint* pict_tvg = tvg_picture_new();
|
|
||||||
if (tvg_picture_load(pict_tvg, EXAMPLE_DIR"/capi_test.tvg") != TVG_RESULT_SUCCESS) {
|
|
||||||
printf("Problem with loading a tvg file\n");
|
|
||||||
tvg_paint_del(pict_tvg);
|
|
||||||
} else {
|
|
||||||
//Push the scene into the canvas
|
|
||||||
tvg_canvas_push(canvas, pict_tvg);
|
|
||||||
}
|
|
||||||
|
|
||||||
//////7. Animation with a picture
|
|
||||||
animation = tvg_animation_new();
|
animation = tvg_animation_new();
|
||||||
Tvg_Paint* pict_lottie = tvg_animation_get_picture(animation);
|
Tvg_Paint* pict_lottie = tvg_animation_get_picture(animation);
|
||||||
if (tvg_picture_load(pict_lottie, EXAMPLE_DIR"/sample.json") != TVG_RESULT_SUCCESS) {
|
if (tvg_picture_load(pict_lottie, EXAMPLE_DIR"/sample.json") != TVG_RESULT_SUCCESS) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue