]> O.S.I.I.S - jp/vkvg.git/commitdiff
reset simpleConcave if curve
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 18 Jan 2022 18:57:46 +0000 (19:57 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 18 Jan 2022 18:57:46 +0000 (19:57 +0100)
src/vkvg_context.c
src/vkvg_context_internal.c

index 432e9f717ae1dfaae9969d53e7f0f94a85bd5db8..0aef28ff28e33dffcf6000f8070538d3d41e3157 100644 (file)
@@ -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);
index 58db46630207595ecacb5936d80d58f40fcee536..c191c4e98d55106af6720728cef8325a0ac73fa7 100644 (file)
@@ -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);