diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-18 19:57:46 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2022-01-18 19:57:46 +0100 |
| commit | 670378b90eb19cca49c98d66574da82aebe51178 (patch) | |
| tree | a4c1c0f1cf7aa233607d057ba7dcdd044fdb83da | |
| parent | 9079c9a86ec78e565c35159dbebd10a99b4bc988 (diff) | |
reset simpleConcave if curve
| -rw-r--r-- | src/vkvg_context.c | 1 | ||||
| -rw-r--r-- | src/vkvg_context_internal.c | 5 |
2 files changed, 5 insertions, 1 deletions
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); |