From: Jean-Philippe Bruyère Date: Thu, 19 Apr 2018 18:49:59 +0000 (+0200) Subject: debug nx et ny < 0 X-Git-Tag: v0.1-alpha~143 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=e41336e99fbf1558e068b8ec66854bf343b42118;p=jp%2Fvkvg.git debug nx et ny < 0 --- 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; }