]> O.S.I.I.S - jp/vkvg.git/commitdiff
matrix_transform_point for get_arc_steps gives no glitch
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 5 Jan 2022 17:55:10 +0000 (18:55 +0100)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Wed, 5 Jan 2022 17:55:10 +0000 (18:55 +0100)
src/vkvg_context_internal.c

index 5d0d649c27044e862d2e36d19c42331604d6e65b..23e90b15d64b78184b0748926179b8bad05865ee 100644 (file)
@@ -209,7 +209,7 @@ float _normalizeAngle(float a)
 }
 float _get_arc_step (VkvgContext ctx, float radius) {
        float dx = radius, dy = radius;
-       vkvg_matrix_transform_distance (&ctx->pushConsts.mat, &dx, &dy);
+       vkvg_matrix_transform_point (&ctx->pushConsts.mat, &dx, &dy);
        float r = fabsf(fmaxf(dx,dy));
        if (r < 3.0f)
                return asinf (1.0f / r) * 0.25f;
@@ -1361,6 +1361,7 @@ void _poly_fill (VkvgContext ctx){
        }
        ctx->curVertOffset = ctx->vertCount;
 }
+
 //create fill from current path with ear clipping technic
 void _fill_ec (VkvgContext ctx){
        Vertex v = {{0},ctx->curColor, {0,0,-1}};