memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.13k stars 767 forks source link

Tessellation Tolerance Change Issue #108

Open Ziflin opened 10 years ago

Ziflin commented 10 years ago

Not sure if this was intended, but I noticed in the "Fix for issue #94 - bf2037a", the context's "tessTol" value is now:

ctx->tessTol = 0.25f / ratio;

However it doesn't look like _nvg_expandStroke was changed. It still has:

int ncap = nvg__curveDivs(w, NVG_PI, ctx->tessTol / 4.0f);

So basically it's doing another * 0.25 there as well, which seems to result in more caps than is necessary. At least in the test that I did I couldn't tell a difference in / 2.0 vs / 4.0. I think I could see a small difference in / 1.0 vs / 2.0 though which seemed a little odd.

Anyway, it's not a huge issue, but I just wasn't sure if it was just overlooked or intended.

memononen commented 10 years ago

Fixed. Thanks for reporting it!