summaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2026-09-29 02:01:41 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2026-10-01 13:29:27 +0200
commit4557f91636c2fc868b270bf5e0945c9c66b13681 (patch)
treea679e861506f9749d00432ba01773b797a2cd630
parent0baff0247e58fd06ea97a60ece8cd0ec635c94b5 (diff)
adjust distance tolerance for _curve_to
-rw-r--r--docker-compose.build.yml24
-rw-r--r--src/vkvg_context.c2
2 files changed, 22 insertions, 4 deletions
diff --git a/docker-compose.build.yml b/docker-compose.build.yml
index 2941ba6..6bc2c03 100644
--- a/docker-compose.build.yml
+++ b/docker-compose.build.yml
@@ -9,9 +9,9 @@ x-base-config: &base-config
working_dir: /usr/src/app
command: >
bash -c "
- echo ${REF_IMGS_PATH}
- echo '=== Starting Build for ${DISTRO} ==='
- cmake -B build_$${DISTRO} -DCMAKE_BUILD_TYPE=Release -DVKVG_SVG=on -DVKVG_BUILD_DOCS=on -DGTEST_PNG_ROOT=/usr/src/reference-images && cmake --build build_$${DISTRO}
+ echo Starting CI =$${DISTRO}=
+ echo ${REF_IMGS_PATH} ${CURRENT_UID} ${CURRENT_GID} ${USER}
+ cmake -B build_$${DISTRO} -DCMAKE_BUILD_TYPE=Release -DVKVG_SVG=on -DVKVG_BUILD_DOCS=$${BUILD_DOC} -DGTEST_PNG_ROOT=/usr/src/reference-images && cmake --build build_$${DISTRO}
CURRENT_COMMIT=$$(git rev-parse HEAD)
build_$${DISTRO}/gunit_tests/unit_tests --gtest_output=xml:/var/log/unit_tests_$${DISTRO}/$${CURRENT_COMMIT}.xml --gtest_brief
if [ -d build_$${DISTRO}/doc/html ]; then
@@ -25,14 +25,32 @@ services:
image: debian-c-builder:trixie
environment:
- DISTRO=debian
+ - BUILD_DOC=off
+ deploy:
+ resources:
+ limits:
+ cpus: '1.0'
+ memory: 4096M
archlinux:
<<: *base-config
image: arch-c-builder:latest
environment:
- DISTRO=archlinux
+ - BUILD_DOC=off
+ deploy:
+ resources:
+ limits:
+ cpus: '0.2'
+ memory: 2048M
fedora:
<<: *base-config
image: fedora-c-builder:44
environment:
- DISTRO=fedora
+ - BUILD_DOC=off
+ deploy:
+ resources:
+ limits:
+ cpus: '0.2'
+ memory: 2048M
diff --git a/src/vkvg_context.c b/src/vkvg_context.c
index c2a2764..dd9faa2 100644
--- a/src/vkvg_context.c
+++ b/src/vkvg_context.c
@@ -579,7 +579,7 @@ void _curve_to(VkvgContext ctx, float x1, float y1, float x2, float y2, float x3
// compute dyn distanceTolerance depending on current scale
float sx = 1, sy = 1;
vkvg_matrix_get_scale(&ctx->pushConsts.mat, &sx, &sy);
- float distanceTolerance = fabs(0.25f / fmaxf(sx, sy));
+ float distanceTolerance = pow(fabs(0.5f / fmaxf(sx, sy)), 2.f);
_recursive_bezier(ctx, distanceTolerance, cp.x, cp.y, x1, y1, x2, y2, x3, y3, 0);
/*cp.x = x3;