Browse Source

Fix for issue #75

- fixed copy/paste bug in bevel calculations
shared-context
Mikko Mononen 11 years ago
parent
commit
44c168b84e
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      example/demo.c
  2. +1
    -1
      src/nanovg.c

+ 1
- 1
example/demo.c View File

@@ -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); int hit = mx > x && mx < (x+width) && my >= y && my < (y+lineh);


nvgBeginPath(vg); 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); nvgRect(vg, x, y, row->width, lineh);
nvgFill(vg); nvgFill(vg);




+ 1
- 1
src/nanovg.c View File

@@ -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, 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++; nvg__vset(dst, rx1, ry1, ru,1); dst++;
} }




Loading…
Cancel
Save