From: Jean-Philippe Bruyère Date: Wed, 9 Mar 2022 12:15:03 +0000 (+0100) Subject: reduce curve distanceTolerance (1.0->0.25) X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=17b4c4baf2aba846cb0986d8b6b6a6ffddf09763;p=jp%2Fvkvg.git reduce curve distanceTolerance (1.0->0.25) --- diff --git a/README.md b/README.md index de94c3f..1542377 100644 --- a/README.md +++ b/README.md @@ -67,15 +67,16 @@ For API documentation and usage, please refer to the [Cairo](https://www.cairogr ## Current status: -- Fill (stencil even-odd, non-zero with ear clipping). +- Fill (stencil even-odd, non-zero). - Stroke. - Basic painting operation. - Font system with caching operational. -- Linear Gradients. +- Linear/Radial Gradients. - Line caps and joins. +- Dashes. - Context should be thread safe, extensive tests required. - Image loading and writing with [stb lib](https://github.com/nothings/stb) -- Test includes svg rendering with [nanoSVG](https://github.com/memononen/nanosvg) +- Test includes svg rendering either with built-in renderer or [nanoSVG](https://github.com/memononen/nanosvg) ## Requirements: diff --git a/src/vkvg_context.c b/src/vkvg_context.c index b779737..c558976 100644 --- a/src/vkvg_context.c +++ b/src/vkvg_context.c @@ -554,7 +554,7 @@ void _curve_to (VkvgContext ctx, float x1, float y1, float x2, float y2, float x //compute dyn distanceTolerance depending on current scale float sx = 1, sy = 1; vkvg_matrix_get_scale (&ctx->pushConsts.mat, &sx, &sy); - float distanceTolerance = fabs(1.0f / fmaxf(sx,sy)); + float distanceTolerance = fabs(0.25f / fmaxf(sx,sy)); _recursive_bezier (ctx, distanceTolerance, cp.x, cp.y, x1, y1, x2, y2, x3, y3, 0); /*cp.x = x3;