From e41336e99fbf1558e068b8ec66854bf343b42118 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Thu, 19 Apr 2018 20:49:59 +0200 Subject: [PATCH] debug nx et ny < 0 --- src/vkvg_context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vkvg_context.c b/src/vkvg_context.c index c063a50..76d854c 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -389,7 +389,7 @@ void vkvg_stroke_preserve (VkvgContext ctx) if (n.y < 0){ a = asin(n.y); if (n.x < 0) - a += M_PI/8; + a = acos(-n.x) -M_PI_2; else a += M_PI_2; } @@ -439,12 +439,12 @@ void vkvg_stroke_preserve (VkvgContext ctx) if (ctx->lineCap == VKVG_LINE_CAP_ROUND){ firstIdx = ctx->vertCount; - float step = M_PI_2 / hw; + float step = M_PI_4 / hw; float a = acos(n.x)+ M_PI_2; if (n.y < 0){ a = asin(n.y); if (n.x < 0) - a += M_PI/8; + a = acos(-n.x) -M_PI_2; else a += M_PI_2; } -- 2.47.3