From 17b4c4baf2aba846cb0986d8b6b6a6ffddf09763 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Wed, 9 Mar 2022 13:15:03 +0100 Subject: [PATCH] reduce curve distanceTolerance (1.0->0.25) --- README.md | 7 ++++--- src/vkvg_context.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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; -- 2.47.3