From 670378b90eb19cca49c98d66574da82aebe51178 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Tue, 18 Jan 2022 19:57:46 +0100 Subject: [PATCH] reset simpleConcave if curve --- src/vkvg_context.c | 1 + src/vkvg_context_internal.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vkvg_context.c b/src/vkvg_context.c index 432e9f7..0aef28f 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -521,6 +521,7 @@ void _curve_to (VkvgContext ctx, float x1, float y1, float x2, float y2, float x if (_current_path_is_empty(ctx) || (EQUF(_get_current_position(ctx).x,x1) && EQUF(_get_current_position(ctx).y,y1))) return; } + ctx->simpleConvex = false; _set_curve_start (ctx); if (_current_path_is_empty(ctx)) _add_point(ctx, x1, y1); diff --git a/src/vkvg_context_internal.c b/src/vkvg_context_internal.c index 58db466..c191c4e 100644 --- a/src/vkvg_context_internal.c +++ b/src/vkvg_context_internal.c @@ -1501,7 +1501,10 @@ void _elliptic_arc (VkvgContext ctx, float x1, float y1, float x2, float y2, boo if (_current_path_is_empty(ctx)){ _set_curve_start (ctx); _add_point (ctx, xy.x, xy.y); - ctx->simpleConvex = true; + if (!ctx->pathPtr) + ctx->simpleConvex = true; + else + ctx->simpleConvex = false; }else{ _line_to(ctx, xy.x, xy.y); _set_curve_start (ctx); -- 2.47.3