diff --git a/lib/solvers/TraceCleanupSolver/simplifyPath.ts b/lib/solvers/TraceCleanupSolver/simplifyPath.ts
index e17bfb52..647cc24b 100644
--- a/lib/solvers/TraceCleanupSolver/simplifyPath.ts
+++ b/lib/solvers/TraceCleanupSolver/simplifyPath.ts
@@ -1,41 +1,30 @@
import type { Point } from "graphics-debug"
-import {
- isHorizontal,
- isVertical,
-} from "lib/solvers/SchematicTraceLinesSolver/SchematicTraceSingleLineSolver2/collisions"
+
+const isCollinear = (a: Point, b: Point, c: Point): boolean => {
+ const area = Math.abs(
+ a.x * (b.y - c.y) + b.x * (c.y - a.y) + c.x * (a.y - b.y),
+ )
+ return area < 0.1
+}
export const simplifyPath = (path: Point[]): Point[] => {
if (path.length < 3) return path
- const newPath: Point[] = [path[0]]
+
+ const finalPath: Point[] = [path[0]]
+
for (let i = 1; i < path.length - 1; i++) {
- const p1 = newPath[newPath.length - 1]
+ const p1 = finalPath[finalPath.length - 1]
const p2 = path[i]
const p3 = path[i + 1]
- if (
- (isVertical(p1, p2) && isVertical(p2, p3)) ||
- (isHorizontal(p1, p2) && isHorizontal(p2, p3))
- ) {
- continue
- }
- newPath.push(p2)
- }
- newPath.push(path[path.length - 1])
- if (newPath.length < 3) return newPath
- const finalPath: Point[] = [newPath[0]]
- for (let i = 1; i < newPath.length - 1; i++) {
- const p1 = finalPath[finalPath.length - 1]
- const p2 = newPath[i]
- const p3 = newPath[i + 1]
- if (
- (isVertical(p1, p2) && isVertical(p2, p3)) ||
- (isHorizontal(p1, p2) && isHorizontal(p2, p3))
- ) {
+ if (isCollinear(p1, p2, p3)) {
continue
}
+
finalPath.push(p2)
}
- finalPath.push(newPath[newPath.length - 1])
+
+ finalPath.push(path[path.length - 1])
return finalPath
}
diff --git a/tests/examples/__snapshots__/example01.snap.svg b/tests/examples/__snapshots__/example01.snap.svg
index 293bf05a..4d6fea96 100644
--- a/tests/examples/__snapshots__/example01.snap.svg
+++ b/tests/examples/__snapshots__/example01.snap.svg
@@ -2,97 +2,79 @@
+x-" data-x="-0.8" data-y="0.2" cx="422.5742574257426" cy="303.36633663366337" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+x-" data-x="-0.8" data-y="0" cx="422.5742574257426" cy="325.54455445544556" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
+x-" data-x="-0.8" data-y="-0.2" cx="422.5742574257426" cy="347.72277227722776" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
+x+" data-x="0.8" data-y="-0.2" cx="600" cy="347.72277227722776" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
+x+" data-x="0.8" data-y="0" cx="600" cy="325.54455445544556" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
+x+" data-x="0.8" data-y="0.2" cx="600" cy="303.36633663366337" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
+y+" data-x="-2" data-y="0.5" cx="289.50495049504957" cy="270.0990099009901" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
+y-" data-x="-2" data-y="-0.5" cx="289.50495049504957" cy="380.99009900990103" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
+y+" data-x="-4" data-y="0.5" cx="67.72277227722776" cy="270.0990099009901" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
+y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="380.99009900990103" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -127,7 +109,7 @@ y-" data-x="-4" data-y="-0.5" cx="67.72277227722776" cy="356.03960396039605" r="
"e": 511.2871287128713,
"b": 0,
"d": -110.89108910891089,
- "f": 300.5940594059406
+ "f": 325.54455445544556
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example02.snap.svg b/tests/examples/__snapshots__/example02.snap.svg
index 39a46c70..6d8e553f 100644
--- a/tests/examples/__snapshots__/example02.snap.svg
+++ b/tests/examples/__snapshots__/example02.snap.svg
@@ -2,205 +2,205 @@
+y+" data-x="-1.9148566499999995" data-y="1.1024186000000005" cx="247.6918079045066" cy="241.5452305175104" r="3" fill="hsl(246, 100%, 50%, 0.8)" />
+y-" data-x="-1.9143099500000003" data-y="0" cx="247.73681827840002" cy="332.3084889282591" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
+y+" data-x="-4.173189849999999" data-y="1.1024186000000002" cx="61.76091032243295" cy="241.5452305175104" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
+y-" data-x="-4.17264315" data-y="-2.220446049250313e-16" cx="61.80592069632644" cy="332.3084889282591" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
+y+" data-x="-3.0440232499999995" data-y="1.1024186000000002" cx="154.72635911346975" cy="241.5452305175104" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
+y-" data-x="-3.0434765500000003" data-y="-2.220446049250313e-16" cx="154.7713694873632" cy="332.3084889282591" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
+y+" data-x="1.9143099500000003" data-y="0.09999999999999964" cx="562.9510366707918" cy="324.07538596621293" r="3" fill="hsl(5, 100%, 50%, 0.8)" />
+y-" data-x="1.9148566499999995" data-y="-1.0024186000000008" cx="562.9960470446853" cy="414.8386443769616" r="3" fill="hsl(6, 100%, 50%, 0.8)" />
+x-" data-x="-1" data-y="0.2" cx="323.01289785413354" cy="315.84228300416663" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+x-" data-x="-1" data-y="0" cx="323.01289785413354" cy="332.3084889282591" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
+x-" data-x="-1" data-y="-0.2" cx="323.01289785413354" cy="348.7746948523516" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
+x+" data-x="1" data-y="-0.1" cx="487.67495709505835" cy="340.54159189030537" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
+x+" data-x="1" data-y="0.1" cx="487.67495709505835" cy="324.0753859662129" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -230,12 +230,12 @@ x+" data-x="1" data-y="0.1" cx="500.20151295522464" cy="324.189420823755" r="3"
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 84.63476411626253,
+ "a": 82.3310296204624,
"c": 0,
- "e": 415.5667488389621,
+ "e": 405.34392747459594,
"b": 0,
- "d": -84.63476411626253,
- "f": 332.6528972353812
+ "d": -82.3310296204624,
+ "f": 332.3084889282591
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example06.snap.svg b/tests/examples/__snapshots__/example06.snap.svg
index c3cee17d..dd0bd000 100644
--- a/tests/examples/__snapshots__/example06.snap.svg
+++ b/tests/examples/__snapshots__/example06.snap.svg
@@ -2,37 +2,37 @@
+x-" data-x="-3.5512907000000005" data-y="0.0002732499999993365" cx="62.695035460992926" cy="328.6891007092198" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
+x+" data-x="-2.4487092999999995" data-y="-0.0002732499999993365" cx="146.10544869976368" cy="328.73044349881786" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
+x-" data-x="2.4487906999999995" data-y="-0.00027334999999961695" cx="516.6019026004727" cy="328.73045106382966" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
+x+" data-x="3.5512093000000005" data-y="0.00027334999999961695" cx="600" cy="328.689093144208" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
@@ -67,7 +67,7 @@ x+" data-x="3.5512093000000005" data-y="0.00027334999999961695" cx="600" cy="318
"e": 331.3505966903073,
"b": 0,
"d": -75.65011820330967,
- "f": 318.8759111111111
+ "f": 328.70977210401884
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example07.snap.svg b/tests/examples/__snapshots__/example07.snap.svg
index bf70ce90..50024b49 100644
--- a/tests/examples/__snapshots__/example07.snap.svg
+++ b/tests/examples/__snapshots__/example07.snap.svg
@@ -2,147 +2,117 @@
+x-" data-x="-1.4" data-y="0.42500000000000004" cx="186.91205638753516" cy="366.88195928930236" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
+x-" data-x="-1.4" data-y="-0.42500000000000004" cx="186.91205638753516" cy="472.78323560547767" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.5" cx="535.7633195467007" cy="357.53772902611047" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.30000000000000004" cx="535.7633195467007" cy="382.4556763946223" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.10000000000000009" cx="535.7633195467007" cy="407.3736237631341" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.09999999999999998" cx="535.7633195467007" cy="432.2915711316459" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.3" cx="535.7633195467007" cy="457.20951850015774" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.5" cx="535.7633195467007" cy="482.12746586866956" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
+y+" data-x="-2.3148566499999994" data-y="0.5512093000000002" cx="72.93030711537" cy="351.15757581521876" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
+y-" data-x="-2.31430995" data-y="-0.5512093000000002" cx="72.99842032450175" cy="488.50761907956127" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
+y+" data-x="1.7580660749999977" data-y="2.3025814000000002" cx="580.3746776031984" cy="132.95458676281862" r="3" fill="hsl(125, 100%, 50%, 0.8)" />
+y-" data-x="1.757519574999999" data-y="1.2" cx="580.3065893120141" cy="270.32491323631905" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -172,12 +142,12 @@ y-" data-x="1.757519574999999" data-y="1.2" cx="547.3539750075635" cy="270.41751
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 116.99116664985878,
+ "a": 124.58973684255912,
"c": 0,
- "e": 341.7397095183496,
+ "e": 361.3376879671179,
"b": 0,
- "d": -116.99116664985878,
- "f": 410.8069115268456
+ "d": -124.58973684255912,
+ "f": 419.83259744739
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example12.snap.svg b/tests/examples/__snapshots__/example12.snap.svg
index 164322ef..197a1b07 100644
--- a/tests/examples/__snapshots__/example12.snap.svg
+++ b/tests/examples/__snapshots__/example12.snap.svg
@@ -29,10 +29,10 @@ x-" data-x="2.3099999999999996" data-y="0.01999999999999985" cx="424.92239467849
x+" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.75095787139696" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
-
+
-
+
@@ -56,7 +56,7 @@ x+" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.750
-
+
@@ -74,10 +74,10 @@ x+" data-x="3.41" data-y="0.01999999999999985" cx="549.090909090909" cy="227.750
-
+
-
+
diff --git a/tests/examples/__snapshots__/example14.snap.svg b/tests/examples/__snapshots__/example14.snap.svg
deleted file mode 100644
index 6ed20775..00000000
--- a/tests/examples/__snapshots__/example14.snap.svg
+++ /dev/null
@@ -1,213 +0,0 @@
-
\ No newline at end of file
diff --git a/tests/examples/__snapshots__/example15.snap.svg b/tests/examples/__snapshots__/example15.snap.svg
index fa7b2fbe..84b2204e 100644
--- a/tests/examples/__snapshots__/example15.snap.svg
+++ b/tests/examples/__snapshots__/example15.snap.svg
@@ -2,901 +2,847 @@
+x-" data-x="-1.1099999999999999" data-y="1.2000000000000015" cx="365.4470426409904" cy="322.69601100412643" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-1.8000000000000007" cx="365.4470426409904" cy="476.75378266850066" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-2.000000000000001" cx="365.4470426409904" cy="487.02430077945894" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-2.200000000000001" cx="365.4470426409904" cy="497.2948188904172" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-2.4000000000000012" cx="365.4470426409904" cy="507.5653370013755" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-2.6000000000000014" cx="365.4470426409904" cy="517.8358551123338" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-2.8000000000000016" cx="365.4470426409904" cy="528.106373223292" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-3.0000000000000018" cx="365.4470426409904" cy="538.3768913342503" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-3.200000000000002" cx="365.4470426409904" cy="548.6474094452086" r="3" fill="hsl(89, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="1.0000000000000013" cx="365.4470426409904" cy="332.9665291150847" r="3" fill="hsl(39, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-3.400000000000002" cx="365.4470426409904" cy="558.9179275561669" r="3" fill="hsl(40, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-3.6000000000000023" cx="365.4470426409904" cy="569.1884456671252" r="3" fill="hsl(41, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-3.8000000000000025" cx="365.4470426409904" cy="579.4589637780834" r="3" fill="hsl(42, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-4.000000000000002" cx="365.4470426409904" cy="589.7294818890416" r="3" fill="hsl(43, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-0.5000000000000009" cx="560.5868867491974" cy="409.9954149472719" r="3" fill="hsl(44, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-0.7000000000000011" cx="560.5868867491974" cy="420.2659330582302" r="3" fill="hsl(45, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-0.9000000000000012" cx="560.5868867491974" cy="430.53645116918847" r="3" fill="hsl(46, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-1.1000000000000014" cx="560.5868867491974" cy="440.80696928014675" r="3" fill="hsl(47, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-1.3000000000000014" cx="560.5868867491974" cy="451.077487391105" r="3" fill="hsl(48, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-1.9000000000000015" cx="560.5868867491974" cy="481.8890417239798" r="3" fill="hsl(70, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-2.1000000000000014" cx="560.5868867491974" cy="492.1595598349381" r="3" fill="hsl(71, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="0.8000000000000012" cx="365.4470426409904" cy="343.23704722604305" r="3" fill="hsl(72, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="2.8000000000000016" cx="365.4470426409904" cy="240.5318661164603" r="3" fill="hsl(73, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-2.7000000000000015" cx="560.5868867491974" cy="522.9711141678129" r="3" fill="hsl(74, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-2.9000000000000012" cx="560.5868867491974" cy="533.2416322787711" r="3" fill="hsl(75, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="-3.1000000000000014" cx="560.5868867491974" cy="543.5121503897294" r="3" fill="hsl(76, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="0.0999999999999992" cx="560.5868867491974" cy="379.1838606143971" r="3" fill="hsl(77, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="0.2999999999999994" cx="560.5868867491974" cy="368.9133425034388" r="3" fill="hsl(78, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="0.49999999999999956" cx="560.5868867491974" cy="358.6428243924805" r="3" fill="hsl(79, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="0.6999999999999997" cx="560.5868867491974" cy="348.37230628152224" r="3" fill="hsl(101, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="0.8999999999999995" cx="560.5868867491974" cy="338.10178817056396" r="3" fill="hsl(102, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="1.0999999999999996" cx="560.5868867491974" cy="327.8312700596057" r="3" fill="hsl(103, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="0.600000000000001" cx="365.4470426409904" cy="353.5075653370013" r="3" fill="hsl(104, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="1.2999999999999998" cx="560.5868867491974" cy="317.5607519486474" r="3" fill="hsl(105, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="1.5" cx="560.5868867491974" cy="307.29023383768913" r="3" fill="hsl(106, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="1.7000000000000002" cx="560.5868867491974" cy="297.01971572673085" r="3" fill="hsl(107, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="1.9000000000000004" cx="560.5868867491974" cy="286.7491976157726" r="3" fill="hsl(108, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="2.500000000000001" cx="560.5868867491974" cy="255.93764328289774" r="3" fill="hsl(109, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="2.700000000000001" cx="560.5868867491974" cy="245.66712517193943" r="3" fill="hsl(110, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="2.9000000000000012" cx="560.5868867491974" cy="235.39660706098115" r="3" fill="hsl(132, 100%, 50%, 0.8)" />
+x+" data-x="2.69" data-y="3.1000000000000014" cx="560.5868867491974" cy="225.12608895002288" r="3" fill="hsl(133, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="0.4000000000000008" cx="365.4470426409904" cy="363.7780834479596" r="3" fill="hsl(134, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-1.6000000000000005" cx="365.4470426409904" cy="466.4832645575424" r="3" fill="hsl(135, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="2.0000000000000018" cx="365.4470426409904" cy="281.6139385602934" r="3" fill="hsl(136, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="1.8000000000000016" cx="365.4470426409904" cy="291.88445667125166" r="3" fill="hsl(137, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-1.4000000000000004" cx="365.4470426409904" cy="456.2127464465841" r="3" fill="hsl(138, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-1.2000000000000002" cx="365.4470426409904" cy="445.94222833562577" r="3" fill="hsl(139, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-1" cx="365.4470426409904" cy="435.6717102246675" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="0.20000000000000062" cx="365.4470426409904" cy="374.0486015589179" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="2.600000000000002" cx="365.4470426409904" cy="250.80238422741854" r="3" fill="hsl(163, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="3.0000000000000018" cx="365.4470426409904" cy="230.26134800550201" r="3" fill="hsl(164, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="3.200000000000002" cx="365.4470426409904" cy="219.9908298945437" r="3" fill="hsl(165, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="3.4000000000000017" cx="365.4470426409904" cy="209.72031178358546" r="3" fill="hsl(166, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="3.600000000000002" cx="365.4470426409904" cy="199.44979367262718" r="3" fill="hsl(167, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="3.8000000000000016" cx="365.4470426409904" cy="189.17927556166893" r="3" fill="hsl(168, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="4.000000000000002" cx="365.4470426409904" cy="178.90875745071065" r="3" fill="hsl(169, 100%, 50%, 0.8)" />
+x-" data-x="-1.1099999999999999" data-y="-0.39999999999999947" cx="365.4470426409904" cy="404.86015589179266" r="3" fill="hsl(170, 100%, 50%, 0.8)" />
+y+" data-x="-1.5675" data-y="6.505000000000002" cx="341.95323246217333" cy="50.270518110958335" r="3" fill="hsl(351, 100%, 50%, 0.8)" />
+y-" data-x="-1.5675" data-y="5.405000000000002" cx="341.95323246217333" cy="106.75836772122875" r="3" fill="hsl(352, 100%, 50%, 0.8)" />
+y+" data-x="-0.6374999999999998" data-y="6.505000000000002" cx="389.7111416781293" cy="50.270518110958335" r="3" fill="hsl(113, 100%, 50%, 0.8)" />
+y-" data-x="-0.6374999999999998" data-y="5.405000000000002" cx="389.7111416781293" cy="106.75836772122875" r="3" fill="hsl(114, 100%, 50%, 0.8)" />
+y+" data-x="-2.4975" data-y="6.505000000000002" cx="294.19532324621736" cy="50.270518110958335" r="3" fill="hsl(8, 100%, 50%, 0.8)" />
+y-" data-x="-2.4975" data-y="5.405000000000002" cx="294.19532324621736" cy="106.75836772122875" r="3" fill="hsl(9, 100%, 50%, 0.8)" />
+y+" data-x="0.29250000000000037" data-y="6.505000000000002" cx="437.4690508940853" cy="50.270518110958335" r="3" fill="hsl(232, 100%, 50%, 0.8)" />
+y-" data-x="0.2925000000000005" data-y="5.405000000000002" cx="437.4690508940853" cy="106.75836772122875" r="3" fill="hsl(233, 100%, 50%, 0.8)" />
+y+" data-x="1.2225000000000006" data-y="6.505000000000002" cx="485.2269601100412" cy="50.270518110958335" r="3" fill="hsl(354, 100%, 50%, 0.8)" />
+y-" data-x="1.2225000000000006" data-y="5.405000000000002" cx="485.2269601100412" cy="106.75836772122875" r="3" fill="hsl(355, 100%, 50%, 0.8)" />
+y+" data-x="2.1525000000000007" data-y="6.505000000000002" cx="532.9848693259972" cy="50.270518110958335" r="3" fill="hsl(238, 100%, 50%, 0.8)" />
+y-" data-x="2.1525000000000007" data-y="5.405000000000002" cx="532.9848693259972" cy="106.75836772122875" r="3" fill="hsl(239, 100%, 50%, 0.8)" />
+y+" data-x="-4.6850000000000005" data-y="3.7683333333333353" cx="181.86153140761124" cy="190.8054409292373" r="3" fill="hsl(357, 100%, 50%, 0.8)" />
+y-" data-x="-4.6850000000000005" data-y="2.668333333333335" cx="181.86153140761124" cy="247.2932905395078" r="3" fill="hsl(358, 100%, 50%, 0.8)" />
+y+" data-x="-3.7550000000000003" data-y="3.7683333333333353" cx="229.61944062356721" cy="190.8054409292373" r="3" fill="hsl(127, 100%, 50%, 0.8)" />
+y-" data-x="-3.7550000000000003" data-y="2.668333333333335" cx="229.61944062356721" cy="247.2932905395078" r="3" fill="hsl(128, 100%, 50%, 0.8)" />
+y+" data-x="-6.415" data-y="3.7683333333333353" cx="93.02154974782223" cy="190.8054409292373" r="3" fill="hsl(249, 100%, 50%, 0.8)" />
+y-" data-x="-6.415" data-y="2.6683333333333357" cx="93.02154974782223" cy="247.29329053950778" r="3" fill="hsl(250, 100%, 50%, 0.8)" />
+y+" data-x="-2.025" data-y="2.000000000000001" cx="318.4594222833563" cy="281.6139385602934" r="3" fill="hsl(229, 100%, 50%, 0.8)" />
+y-" data-x="-2.025" data-y="0.900000000000001" cx="318.4594222833563" cy="338.1017881705639" r="3" fill="hsl(230, 100%, 50%, 0.8)" />
+y+" data-x="-2.025" data-y="-1.6000000000000003" cx="318.4594222833563" cy="466.4832645575423" r="3" fill="hsl(110, 100%, 50%, 0.8)" />
+y-" data-x="-2.025" data-y="-2.7" cx="318.4594222833563" cy="522.9711141678129" r="3" fill="hsl(111, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -926,12 +872,12 @@ y-" data-x="-2.025" data-y="-2.7" cx="318.5204755614267" cy="526.0237780713342"
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 49.31748128577717,
+ "a": 51.352590554791355,
"c": 0,
- "e": 418.38837516512547,
+ "e": 422.44841815680877,
"b": 0,
- "d": -49.31748128577717,
- "f": 392.86657859973576
+ "d": -51.352590554791355,
+ "f": 384.31911966987616
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example16.snap.svg b/tests/examples/__snapshots__/example16.snap.svg
index 24745c44..1bcf4a36 100644
--- a/tests/examples/__snapshots__/example16.snap.svg
+++ b/tests/examples/__snapshots__/example16.snap.svg
@@ -2,92 +2,92 @@
+x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="457.48" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="457.48" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="412.68" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="390.28" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="412.68" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="435.08" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="435.08" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="390.28" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="2.105" cx="353.6" cy="188.12" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="1.9049999999999998" cx="353.6" cy="210.52" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="232.92000000000002" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -122,7 +122,7 @@ x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="244.12000000000006"
"e": 174.40000000000003,
"b": 0,
"d": -112,
- "f": 435.08000000000004
+ "f": 423.88
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example17.snap.svg b/tests/examples/__snapshots__/example17.snap.svg
index 9900be1e..f09abb69 100644
--- a/tests/examples/__snapshots__/example17.snap.svg
+++ b/tests/examples/__snapshots__/example17.snap.svg
@@ -65,7 +65,7 @@ x-" data-x="3.6500000000000004" data-y="-0.3000000000000007" cx="519.37172774869
x+" data-x="4.75" data-y="-0.3000000000000007" cx="600" cy="395.8638743455498" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
-
+
@@ -95,7 +95,7 @@ x+" data-x="4.75" data-y="-0.3000000000000007" cx="600" cy="395.8638743455498" r
-
+
@@ -116,7 +116,7 @@ x+" data-x="4.75" data-y="-0.3000000000000007" cx="600" cy="395.8638743455498" r
-
+
diff --git a/tests/examples/__snapshots__/example18.snap.svg b/tests/examples/__snapshots__/example18.snap.svg
index d3b910b0..1fc77fa0 100644
--- a/tests/examples/__snapshots__/example18.snap.svg
+++ b/tests/examples/__snapshots__/example18.snap.svg
@@ -2,178 +2,148 @@
+x-" data-x="-1.4" data-y="0.42500000000000004" cx="213.2774380790512" cy="227.58519984468603" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
+x-" data-x="-1.4" data-y="-0.42500000000000004" cx="213.2774380790512" cy="312.5069080955151" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.5" cx="493.019535846488" cy="220.09210794020112" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.30000000000000004" cx="493.019535846488" cy="240.0736863521609" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.10000000000000009" cx="493.019535846488" cy="260.05526476412064" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.09999999999999998" cx="493.019535846488" cy="280.0368431760804" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.3" cx="493.019535846488" cy="300.0184215880402" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.5" cx="493.019535846488" cy="320" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
+y+" data-x="-2.3148566499999994" data-y="0.5512093000000002" cx="121.87603864066205" cy="214.97589472334323" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
+y-" data-x="-2.31430995" data-y="-0.5512093000000002" cx="121.93065828525107" cy="325.1162132168579" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
+y+" data-x="1.7580660749999977" data-y="2.3025814000000002" cx="528.7931626178636" cy="39.99999999999997" r="3" fill="hsl(125, 100%, 50%, 0.8)" />
+y-" data-x="1.757519574999999" data-y="1.2" cx="528.738562954853" cy="150.15658349834192" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
+y-" data-x="-1.7580660749999977" data-y="-3.3025814000000002" cx="177.50381130767556" cy="600" r="3" fill="hsl(6, 100%, 50%, 0.8)" />
+y+" data-x="-1.757519574999999" data-y="-2.2" cx="177.5584109706861" cy="489.8434165016581" r="3" fill="hsl(7, 100%, 50%, 0.8)" />
+y-" data-x="1.7580660749999977" data-y="-3.3025814000000002" cx="528.7931626178636" cy="600" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
+y+" data-x="1.757519574999999" data-y="-2.2" cx="528.738562954853" cy="489.8434165016581" r="3" fill="hsl(248, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -203,12 +173,12 @@ y+" data-x="1.757519574999999" data-y="-2.2" cx="493.97982495355666" cy="501.290
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 89.52604718777262,
+ "a": 99.90789205979887,
"c": 0,
- "e": 336.63604454867266,
+ "e": 353.1484869627696,
"b": 0,
- "d": -89.52604718777262,
- "f": 304.3329417421398
+ "d": -99.90789205979887,
+ "f": 270.04605397010056
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example19.snap.svg b/tests/examples/__snapshots__/example19.snap.svg
index 1ae98880..f1975163 100644
--- a/tests/examples/__snapshots__/example19.snap.svg
+++ b/tests/examples/__snapshots__/example19.snap.svg
@@ -2,138 +2,114 @@
+x+" data-x="0.6000000000000001" data-y="-0.2" cx="160.00000000000003" cy="346.4743625" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0" cx="160.00000000000003" cy="326.4743625" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.2" cx="160.00000000000003" cy="306.4743625" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+y-" data-x="1.4002733499999995" data-y="-0.0012093000000001908" cx="240.027335" cy="326.5952925" r="3" fill="hsl(2, 100%, 50%, 0.8)" />
+y+" data-x="1.3997266500000003" data-y="1.1012093000000003" cx="239.97266500000006" cy="216.35343249999994" r="3" fill="hsl(3, 100%, 50%, 0.8)" />
+x-" data-x="2.1487092999999997" data-y="1.3002732499999994" cx="314.87093" cy="196.44703750000005" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
+x+" data-x="3.2512907000000006" data-y="1.2997267500000007" cx="425.12907000000007" cy="196.50168749999992" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
+x-" data-x="3.8000000000000003" data-y="0" cx="480" cy="326.4743625" r="3" fill="hsl(242, 100%, 50%, 0.8)" />
+x-" data-x="3.8000000000000003" data-y="-0.9" cx="480" cy="416.4743625" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
+x+" data-x="2.4458007999999998" data-y="-1.2015872704999997" cx="344.58008" cy="446.63308954999997" r="3" fill="hsl(245, 100%, 50%, 0.8)" />
+y+" data-x="2.0034928" data-y="-0.8350319000000007" cx="300.34928" cy="409.97755250000006" r="3" fill="hsl(246, 100%, 50%, 0.8)" />
+x-" data-x="1.5541992" data-y="-1.2014628704999997" cx="255.41992000000002" cy="446.62064954999994" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -168,7 +144,7 @@ x-" data-x="1.5541992" data-y="-1.2014628704999997" cx="255.41992000000002" cy="
"e": 100.00000000000003,
"b": 0,
"d": -100,
- "f": 339.23793250000006
+ "f": 326.4743625
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example20.snap.svg b/tests/examples/__snapshots__/example20.snap.svg
index ba057c2c..1fc77fa0 100644
--- a/tests/examples/__snapshots__/example20.snap.svg
+++ b/tests/examples/__snapshots__/example20.snap.svg
@@ -2,178 +2,148 @@
+x-" data-x="-1.4" data-y="0.42500000000000004" cx="213.2774380790512" cy="227.58519984468603" r="3" fill="hsl(88, 100%, 50%, 0.8)" />
+x-" data-x="-1.4" data-y="-0.42500000000000004" cx="213.2774380790512" cy="312.5069080955151" r="3" fill="hsl(84, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.5" cx="493.019535846488" cy="220.09210794020112" r="3" fill="hsl(81, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.30000000000000004" cx="493.019535846488" cy="240.0736863521609" r="3" fill="hsl(86, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.10000000000000009" cx="493.019535846488" cy="260.05526476412064" r="3" fill="hsl(85, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.09999999999999998" cx="493.019535846488" cy="280.0368431760804" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.3" cx="493.019535846488" cy="300.0184215880402" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.5" cx="493.019535846488" cy="320" r="3" fill="hsl(87, 100%, 50%, 0.8)" />
+y+" data-x="-2.3148566499999994" data-y="0.5512093000000002" cx="121.87603864066205" cy="214.97589472334323" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
+y-" data-x="-2.31430995" data-y="-0.5512093000000002" cx="121.93065828525107" cy="325.1162132168579" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
+y+" data-x="1.7580660749999977" data-y="2.3025814000000002" cx="528.7931626178636" cy="39.99999999999997" r="3" fill="hsl(125, 100%, 50%, 0.8)" />
+y-" data-x="1.757519574999999" data-y="1.2" cx="528.738562954853" cy="150.15658349834192" r="3" fill="hsl(126, 100%, 50%, 0.8)" />
+y-" data-x="-1.7580660749999977" data-y="-3.3025814000000002" cx="177.50381130767556" cy="600" r="3" fill="hsl(6, 100%, 50%, 0.8)" />
+y+" data-x="-1.757519574999999" data-y="-2.2" cx="177.5584109706861" cy="489.8434165016581" r="3" fill="hsl(7, 100%, 50%, 0.8)" />
+y-" data-x="1.7580660749999977" data-y="-3.3025814000000002" cx="528.7931626178636" cy="600" r="3" fill="hsl(247, 100%, 50%, 0.8)" />
+y+" data-x="1.757519574999999" data-y="-2.2" cx="528.738562954853" cy="489.8434165016581" r="3" fill="hsl(248, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -203,12 +173,12 @@ y+" data-x="1.757519574999999" data-y="-2.2" cx="479.91860312291124" cy="509.268
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 82.2904633523242,
+ "a": 99.90789205979887,
"c": 0,
- "e": 335.2915029453814,
+ "e": 353.1484869627696,
"b": 0,
- "d": -82.2904633523242,
- "f": 328.22904633523245
+ "d": -99.90789205979887,
+ "f": 270.04605397010056
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example21.snap.svg b/tests/examples/__snapshots__/example21.snap.svg
index 5e7e7ceb..e059a481 100644
--- a/tests/examples/__snapshots__/example21.snap.svg
+++ b/tests/examples/__snapshots__/example21.snap.svg
@@ -2,209 +2,161 @@
+x-" data-x="-1.4" data-y="-0.6" cx="83.3002426649018" cy="310.73461283917936" r="3" fill="hsl(65, 100%, 50%, 0.8)" />
+x-" data-x="-1.4" data-y="0.6" cx="83.3002426649018" cy="236.61151555261415" r="3" fill="hsl(66, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="0.6" cx="256.2541363335539" cy="236.61151555261415" r="3" fill="hsl(67, 100%, 50%, 0.8)" />
+x+" data-x="1.4" data-y="-0.6" cx="256.2541363335539" cy="310.73461283917936" r="3" fill="hsl(68, 100%, 50%, 0.8)" />
+x-" data-x="3.785" data-y="-0.29999999999999993" cx="403.57379219060226" cy="292.20383851753803" r="3" fill="hsl(175, 100%, 50%, 0.8)" />
+y-" data-x="4.785" data-y="-1.2999999999999998" cx="465.3430399294066" cy="353.97308625634236" r="3" fill="hsl(176, 100%, 50%, 0.8)" />
+x-" data-x="3.785" data-y="-0.4999999999999999" cx="403.57379219060226" cy="304.5576880652989" r="3" fill="hsl(177, 100%, 50%, 0.8)" />
+x+" data-x="5.785" data-y="-0.3999999999999999" cx="527.1122876682109" cy="298.3807632914185" r="3" fill="hsl(179, 100%, 50%, 0.8)" />
+y+" data-x="6.7" data-y="-0.39999999999999925" cx="583.6311493492169" cy="298.3807632914184" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
+y-" data-x="6.7" data-y="-1.4999999999999993" cx="583.6311493492169" cy="366.3269358041032" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
+y+" data-x="2.8699999999999997" data-y="-1.2" cx="347.05493050959626" cy="347.79616148246197" r="3" fill="hsl(337, 100%, 50%, 0.8)" />
+y-" data-x="2.8699999999999997" data-y="-2.3" cx="347.05493050959626" cy="415.74233399514674" r="3" fill="hsl(338, 100%, 50%, 0.8)" />
+y+" data-x="2.9752723250000006" data-y="0.6000000000000003" cx="353.5575228325613" cy="236.61151555261415" r="3" fill="hsl(82, 100%, 50%, 0.8)" />
+y-" data-x="2.9752723250000006" data-y="-0.4999999999999998" cx="353.5575228325613" cy="304.5576880652989" r="3" fill="hsl(83, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -234,12 +186,12 @@ y-" data-x="2.9752723250000006" data-y="-0.4999999999999998" cx="345.12348870636
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 63.88318503308236,
+ "a": 61.76924773880433,
"c": 0,
- "e": 155.05361624458132,
+ "e": 169.77718949922786,
"b": 0,
- "d": -63.88318503308236,
- "f": 265.69929272188
+ "d": -61.76924773880433,
+ "f": 273.67306419589676
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example22.snap.svg b/tests/examples/__snapshots__/example22.snap.svg
index 7790385c..57b50e9b 100644
--- a/tests/examples/__snapshots__/example22.snap.svg
+++ b/tests/examples/__snapshots__/example22.snap.svg
@@ -2,80 +2,80 @@
+x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="454.68" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="454.68" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="409.88" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="387.47999999999996" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="409.88" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="432.28" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="432.28" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="387.47999999999996" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="2.105" cx="353.6" cy="185.32" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="1.9049999999999998" cx="353.6" cy="207.72" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="230.12" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -110,7 +110,7 @@ x-" data-x="1.6" data-y="1.7049999999999998" cx="353.6" cy="244.12000000000006"
"e": 174.40000000000003,
"b": 0,
"d": -112,
- "f": 435.08000000000004
+ "f": 421.08
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example23.snap.svg b/tests/examples/__snapshots__/example23.snap.svg
index 2da4a330..b8f880e7 100644
--- a/tests/examples/__snapshots__/example23.snap.svg
+++ b/tests/examples/__snapshots__/example23.snap.svg
@@ -2,80 +2,80 @@
+x+" data-x="1.2000000000000002" data-y="-0.30000000000000004" cx="308.80000000000007" cy="241.88" r="3" fill="hsl(319, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.30000000000000004" cx="40" cy="241.88" r="3" fill="hsl(320, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.09999999999999998" cx="308.80000000000007" cy="197.08" r="3" fill="hsl(321, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.30000000000000004" cx="40" cy="174.68" r="3" fill="hsl(322, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="0.10000000000000003" cx="40" cy="197.07999999999998" r="3" fill="hsl(323, 100%, 50%, 0.8)" />
+x-" data-x="-1.2000000000000002" data-y="-0.09999999999999998" cx="40" cy="219.48" r="3" fill="hsl(324, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="-0.10000000000000003" cx="308.80000000000007" cy="219.48000000000002" r="3" fill="hsl(325, 100%, 50%, 0.8)" />
+x+" data-x="1.2000000000000002" data-y="0.30000000000000004" cx="308.80000000000007" cy="174.68" r="3" fill="hsl(326, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="-1.895" cx="353.6" cy="420.52" r="3" fill="hsl(218, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="-2.095" cx="353.6" cy="442.92" r="3" fill="hsl(219, 100%, 50%, 0.8)" />
+x-" data-x="1.6" data-y="-2.295" cx="353.6" cy="465.31999999999994" r="3" fill="hsl(220, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -110,7 +110,7 @@ x-" data-x="1.6" data-y="-2.295" cx="353.6" cy="451.31999999999994" r="3" fill="
"e": 174.40000000000003,
"b": 0,
"d": -112,
- "f": 194.28
+ "f": 208.28
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example25.snap.svg b/tests/examples/__snapshots__/example25.snap.svg
index ea060fe1..f3466789 100644
--- a/tests/examples/__snapshots__/example25.snap.svg
+++ b/tests/examples/__snapshots__/example25.snap.svg
@@ -64,7 +64,7 @@ x+" data-x="0.6" data-y="-2.8" cx="363.855421686747" cy="416.14457831325296" r="
-
+
@@ -79,10 +79,10 @@ x+" data-x="0.6" data-y="-2.8" cx="363.855421686747" cy="416.14457831325296" r="
-
+
-
+
@@ -97,7 +97,7 @@ x+" data-x="0.6" data-y="-2.8" cx="363.855421686747" cy="416.14457831325296" r="
-
+
diff --git a/tests/examples/__snapshots__/example26.snap.svg b/tests/examples/__snapshots__/example26.snap.svg
index c24bd617..fca3613c 100644
--- a/tests/examples/__snapshots__/example26.snap.svg
+++ b/tests/examples/__snapshots__/example26.snap.svg
@@ -53,7 +53,7 @@ y-" data-x="-0.4" data-y="0.5" cx="296.3855421686747" cy="311.566265060241" r="3
y-" data-x="0.4" data-y="0.5" cx="350.3614457831325" cy="311.566265060241" r="3" fill="hsl(203, 100%, 50%, 0.8)" />
-
+
@@ -71,7 +71,7 @@ y-" data-x="0.4" data-y="0.5" cx="350.3614457831325" cy="311.566265060241" r="3"
-
+
@@ -86,7 +86,7 @@ y-" data-x="0.4" data-y="0.5" cx="350.3614457831325" cy="311.566265060241" r="3"
-
+
diff --git a/tests/examples/__snapshots__/example28.snap.svg b/tests/examples/__snapshots__/example28.snap.svg
index 5a3afb7e..297fda4b 100644
--- a/tests/examples/__snapshots__/example28.snap.svg
+++ b/tests/examples/__snapshots__/example28.snap.svg
@@ -2,216 +2,162 @@
+y+" data-x="-5.005" data-y="2.54" cx="55.35329792453959" cy="256.82627111747075" r="3" fill="hsl(230, 100%, 50%, 0.8)" />
+y-" data-x="-4.995" data-y="1.46" cx="55.841125946798485" cy="309.51169752143335" r="3" fill="hsl(231, 100%, 50%, 0.8)" />
+x-" data-x="-0.58" data-y="2.98" cx="271.2171977741087" cy="235.36183813807858" r="3" fill="hsl(40, 100%, 50%, 0.8)" />
+x+" data-x="0.58" data-y="2.97" cx="327.8052483561426" cy="235.84966616033748" r="3" fill="hsl(41, 100%, 50%, 0.8)" />
+x-" data-x="2.48" data-y="3" cx="420.4925725853361" cy="234.38618209356073" r="3" fill="hsl(32, 100%, 50%, 0.8)" />
+x+" data-x="3.52" data-y="3" cx="471.2266869002631" cy="234.38618209356073" r="3" fill="hsl(33, 100%, 50%, 0.8)" />
+y-" data-x="3" data-y="-0.49500000000000005" cx="445.8596297427996" cy="404.8820758730509" r="3" fill="hsl(122, 100%, 50%, 0.8)" />
+y+" data-x="3" data-y="0.49500000000000005" cx="445.8596297427996" cy="356.58710166941853" r="3" fill="hsl(121, 100%, 50%, 0.8)" />
+y+" data-x="6" data-y="0.55" cx="592.2080364204736" cy="353.9040475469945" r="3" fill="hsl(226, 100%, 50%, 0.8)" />
+y-" data-x="6" data-y="-0.55" cx="592.2080364204736" cy="407.56512999547493" r="3" fill="hsl(227, 100%, 50%, 0.8)" />
+y+" data-x="-2.9999378" data-y="0.4458008" cx="153.16585067775011" cy="358.98717651269055" r="3" fill="hsl(111, 100%, 50%, 0.8)" />
+y-" data-x="-3.0000622" data-y="-0.4458008" cx="153.15978209715323" cy="402.48200102977887" r="3" fill="hsl(112, 100%, 50%, 0.8)" />
+y+" data-x="0.3" data-y="0.58" cx="314.146063732893" cy="352.44056348021775" r="3" fill="hsl(311, 100%, 50%, 0.8)" />
+y-" data-x="0.31" data-y="-0.58" cx="314.633891755152" cy="409.0286140622517" r="3" fill="hsl(312, 100%, 50%, 0.8)" />
+x-" data-x="-0.445" data-y="-0.1" cx="277.802876074604" cy="385.61286899382384" r="3" fill="hsl(313, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -246,7 +192,7 @@ x-" data-x="-0.445" data-y="-0.1" cx="277.802876074604" cy="382.68590086027035"
"e": 299.51122306512565,
"b": 0,
"d": -48.782802225891324,
- "f": 377.8076206376812
+ "f": 380.7345887712347
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute:
diff --git a/tests/examples/__snapshots__/example29.snap.svg b/tests/examples/__snapshots__/example29.snap.svg
index c931ee37..7b2b4143 100644
--- a/tests/examples/__snapshots__/example29.snap.svg
+++ b/tests/examples/__snapshots__/example29.snap.svg
@@ -507,7 +507,7 @@ x+" data-x="-8.4" data-y="-17" cx="198.31710258539454" cy="399.68032912258366" r
-
+
@@ -822,7 +822,7 @@ x+" data-x="-8.4" data-y="-17" cx="198.31710258539454" cy="399.68032912258366" r
-
+
@@ -1029,7 +1029,7 @@ x+" data-x="-8.4" data-y="-17" cx="198.31710258539454" cy="399.68032912258366" r
-
+
diff --git a/tests/examples/__snapshots__/example30.snap.svg b/tests/examples/__snapshots__/example30.snap.svg
index 93a4f249..9fbdf715 100644
--- a/tests/examples/__snapshots__/example30.snap.svg
+++ b/tests/examples/__snapshots__/example30.snap.svg
@@ -2,201 +2,201 @@
+x-" data-x="-0.6000000000000001" data-y="1.0999999999999999" cx="201.6901408450704" cy="174.0845070422535" r="3" fill="hsl(235, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="0.8999999999999999" cx="201.6901408450704" cy="205.6338028169014" r="3" fill="hsl(236, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="0.6999999999999998" cx="201.6901408450704" cy="237.1830985915493" r="3" fill="hsl(237, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="0.4999999999999998" cx="201.6901408450704" cy="268.7323943661972" r="3" fill="hsl(238, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="0.2999999999999998" cx="201.6901408450704" cy="300.28169014084506" r="3" fill="hsl(239, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="0.09999999999999987" cx="201.6901408450704" cy="331.830985915493" r="3" fill="hsl(240, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-0.10000000000000009" cx="201.6901408450704" cy="363.38028169014086" r="3" fill="hsl(241, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-0.30000000000000004" cx="201.6901408450704" cy="394.92957746478874" r="3" fill="hsl(242, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-0.5" cx="201.6901408450704" cy="426.4788732394366" r="3" fill="hsl(243, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-0.7" cx="201.6901408450704" cy="458.0281690140845" r="3" fill="hsl(133, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-0.8999999999999999" cx="201.6901408450704" cy="489.5774647887324" r="3" fill="hsl(134, 100%, 50%, 0.8)" />
+x-" data-x="-0.6000000000000001" data-y="-1.0999999999999999" cx="201.6901408450704" cy="521.1267605633802" r="3" fill="hsl(135, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-1.0999999999999999" cx="390.98591549295776" cy="521.1267605633802" r="3" fill="hsl(136, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-0.8999999999999999" cx="390.98591549295776" cy="489.5774647887324" r="3" fill="hsl(137, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-0.6999999999999998" cx="390.98591549295776" cy="458.0281690140845" r="3" fill="hsl(138, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-0.4999999999999998" cx="390.98591549295776" cy="426.4788732394366" r="3" fill="hsl(139, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-0.2999999999999998" cx="390.98591549295776" cy="394.92957746478874" r="3" fill="hsl(140, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="-0.09999999999999987" cx="390.98591549295776" cy="363.3802816901408" r="3" fill="hsl(141, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.10000000000000009" cx="390.98591549295776" cy="331.83098591549293" r="3" fill="hsl(142, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.30000000000000004" cx="390.98591549295776" cy="300.28169014084506" r="3" fill="hsl(164, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.5" cx="390.98591549295776" cy="268.7323943661972" r="3" fill="hsl(165, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.7" cx="390.98591549295776" cy="237.18309859154928" r="3" fill="hsl(166, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="0.8999999999999999" cx="390.98591549295776" cy="205.6338028169014" r="3" fill="hsl(167, 100%, 50%, 0.8)" />
+x+" data-x="0.6000000000000001" data-y="1.0999999999999999" cx="390.98591549295776" cy="174.0845070422535" r="3" fill="hsl(168, 100%, 50%, 0.8)" />
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -226,12 +226,12 @@ x+" data-x="0.6000000000000001" data-y="1.0999999999999999" cx="401.290322580645
// Calculate real coordinates using inverse transformation
const matrix = {
- "a": 180.6451612903226,
+ "a": 157.74647887323945,
"c": 0,
- "e": 292.90322580645164,
+ "e": 296.3380281690141,
"b": 0,
- "d": -180.6451612903226,
- "f": 310.96774193548384
+ "d": -157.74647887323945,
+ "f": 347.6056338028169
};
// Manually invert and apply the affine transform
// Since we only use translate and scale, we can directly compute: