From: Jean-Philippe Bruyère Date: Tue, 18 Jan 2022 18:57:46 +0000 (+0100) Subject: reset simpleConcave if curve X-Git-Tag: v0.3.0-beta~1 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=670378b90eb19cca49c98d66574da82aebe51178;p=jp%2Fvkvg.git reset simpleConcave if curve --- 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);