diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-07-15 13:48:04 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-07-15 13:48:04 +0200 |
| commit | a77dc464f91da554b5952ea965aa4b65cb0a511f (patch) | |
| tree | 62c72758c7298600aa920a1e7b343670ea207086 /tests/save_restore.c | |
| parent | e6b3bfbe53dbb850414ec7904b9f00e1aacc330d (diff) | |
copy tests from masternewvx-post-transform
Diffstat (limited to 'tests/save_restore.c')
| -rw-r--r-- | tests/save_restore.c | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/tests/save_restore.c b/tests/save_restore.c index 2024fef..834e88a 100644 --- a/tests/save_restore.c +++ b/tests/save_restore.c @@ -1,35 +1,33 @@ #include "test.h" void recurse_draw(VkvgContext ctx, int depth) { - depth++; - vkvg_save(ctx); + depth++; + vkvg_save(ctx); - vkvg_translate (ctx, 5,5); - vkvg_rectangle(ctx, depth,depth,200,200); - vkvg_clip_preserve(ctx); - vkvg_set_source_rgb(ctx, 1.f/depth, 1.f / depth, 1.f / depth); - vkvg_fill_preserve(ctx); - vkvg_set_source_rgb(ctx, 0,0,0); - vkvg_stroke(ctx); + vkvg_translate (ctx, 5,5); + vkvg_rectangle(ctx, (float)depth,(float)depth,200,200); + vkvg_clip_preserve(ctx); + vkvg_set_source_rgb(ctx, 1.f/depth, 1.f / depth, 1.f / depth); + vkvg_fill_preserve(ctx); + vkvg_set_source_rgb(ctx, 0,0,0); + vkvg_stroke(ctx); - if (depth < 20) - recurse_draw (ctx, depth); + if (depth < 20) + recurse_draw (ctx, depth); - vkvg_restore(ctx); + vkvg_restore(ctx); } void test(){ - VkvgContext ctx = vkvg_create(surf); + VkvgContext ctx = vkvg_create(surf); - recurse_draw(ctx, 0); + recurse_draw(ctx, 0); - vkvg_destroy(ctx); + vkvg_destroy(ctx); } int main(int argc, char *argv[]) { - - perform_test (test, 600, 800); - - return 0; + PERFORM_TEST (test, argc, argv); + return 0; } |