From 8487638261feb3fd3f8879be95827042c8ba95b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20Franze=CC=81n?= Date: Thu, 22 Jan 2026 09:10:45 +0100 Subject: [PATCH] Fix elliptical arc rendering when radii need scaling When an SVG elliptical arc's radii are too small to connect the endpoints, the SVG spec requires scaling them up. The makeCubic function correctly calculates scaled radii (rx1, ry1) when lambda > 1, but was passing the original unscaled radii to getArcCenter while using the scaled radii for makePoint. --- SwiftDraw/Sources/LayerTree/LayerTree.Builder.Path.Arc.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SwiftDraw/Sources/LayerTree/LayerTree.Builder.Path.Arc.swift b/SwiftDraw/Sources/LayerTree/LayerTree.Builder.Path.Arc.swift index 0cf58c19..44a70282 100644 --- a/SwiftDraw/Sources/LayerTree/LayerTree.Builder.Path.Arc.swift +++ b/SwiftDraw/Sources/LayerTree/LayerTree.Builder.Path.Arc.swift @@ -159,7 +159,7 @@ func makeCubic(from origin: LayerTree.Point, to destination: LayerTree.Point, ry1 *= lambdaSquareRoot } - let cc = getArcCenter(from: origin, to: destination, fa: large, fs: sweep, rx: rx, ry: ry, sin_phi: sin_phi, cos_phi: cos_phi) + let cc = getArcCenter(from: origin, to: destination, fa: large, fs: sweep, rx: rx1, ry: ry1, sin_phi: sin_phi, cos_phi: cos_phi) var result = [[LayerTree.Float]]()