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/curved_rect.c | |
| parent | e6b3bfbe53dbb850414ec7904b9f00e1aacc330d (diff) | |
copy tests from masternewvx-post-transform
Diffstat (limited to 'tests/curved_rect.c')
| -rw-r--r-- | tests/curved_rect.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/tests/curved_rect.c b/tests/curved_rect.c deleted file mode 100644 index 34e739f..0000000 --- a/tests/curved_rect.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "test.h" - -void test(){ - VkvgContext ctx = vkvg_create(surf); - - float x = 50, y = 50, width = 150, height = 140, radius = 30; - - vkvg_scale(ctx,2,2); - //vkvg_rotate(ctx,0.5f); - - vkvg_set_line_width(ctx,15); - vkvg_set_source_rgba(ctx, 0, 0.5f, 0.4f, 1); - - - if ((radius > height / 2) || (radius > width / 2)) - radius = MIN(height / 2, width / 2); - - vkvg_move_to(ctx, x, y + radius); - vkvg_arc(ctx, x + radius, y + radius, radius, M_PIF, (float)-M_PI_2); - vkvg_line_to(ctx, x + width - radius, y); - vkvg_arc(ctx, x + width - radius, y + radius, radius, (float)-M_PI_2, 0); - vkvg_line_to(ctx, x + width, y + height - radius); - vkvg_arc(ctx, x + width - radius, y + height - radius, radius, 0, (float)M_PI_2); - vkvg_line_to(ctx, x + radius, y + height); - vkvg_arc(ctx, x + radius, y + height - radius, radius, (float)M_PI_2, M_PIF); - vkvg_line_to(ctx, x, y + radius); - vkvg_close_path(ctx); - vkvg_fill_preserve(ctx); - vkvg_set_source_rgba(ctx,0.5,0,0,0.5); - vkvg_stroke(ctx); - - vkvg_destroy(ctx); -} - -int main(int argc, char *argv[]) { - - perform_test (test, 1024, 768); - - return 0; -} |