From 44c168b84e18d2b85214902d8dcb69e993004bfd Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Fri, 23 May 2014 09:42:42 +0300 Subject: [PATCH] Fix for issue #75 - fixed copy/paste bug in bevel calculations --- example/demo.c | 2 +- src/nanovg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/demo.c b/example/demo.c index 5eeebde..2e3e58e 100644 --- a/example/demo.c +++ b/example/demo.c @@ -841,7 +841,7 @@ void drawParagraph(struct NVGcontext* vg, float x, float y, float width, float h int hit = mx > x && mx < (x+width) && my >= y && my < (y+lineh); nvgBeginPath(vg); - nvgFillColor(vg, nvgRGBA(255,255,255,hit?64:8)); + nvgFillColor(vg, nvgRGBA(255,255,255,hit?64:16)); nvgRect(vg, x, y, row->width, lineh); nvgFill(vg); diff --git a/src/nanovg.c b/src/nanovg.c index f8609b8..9677d0c 100644 --- a/src/nanovg.c +++ b/src/nanovg.c @@ -1360,7 +1360,7 @@ static struct NVGvertex* nvg__bevelJoin(struct NVGvertex* dst, struct NVGpoint* nvg__vset(dst, p1->x, p1->y, 0.5f,1); dst++; } - nvg__vset(dst, p1->x + dlx1*rw, p1->y + dly1*rw, lu,1); dst++; + nvg__vset(dst, p1->x + dlx1*lw, p1->y + dly1*lw, lu,1); dst++; nvg__vset(dst, rx1, ry1, ru,1); dst++; }