svg-path-commander 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +61 -5
- package/dist/svg-path-commander.cjs +1 -1
- package/dist/svg-path-commander.cjs.map +1 -1
- package/dist/svg-path-commander.d.ts +119 -33
- package/dist/svg-path-commander.js +1 -1
- package/dist/svg-path-commander.js.map +1 -1
- package/dist/svg-path-commander.mjs +798 -828
- package/dist/svg-path-commander.mjs.map +1 -1
- package/package.json +3 -3
- package/src/convert/pathToAbsolute.ts +16 -70
- package/src/convert/pathToCurve.ts +36 -28
- package/src/convert/pathToRelative.ts +33 -62
- package/src/index.ts +13 -19
- package/src/interface.ts +1 -1
- package/src/math/arcTools.ts +248 -71
- package/src/math/bezier.ts +19 -27
- package/src/math/cubicTools.ts +67 -26
- package/src/math/distanceSquareRoot.ts +3 -1
- package/src/math/lineTools.ts +41 -26
- package/src/math/midPoint.ts +3 -1
- package/src/math/polygonArea.ts +3 -1
- package/src/math/polygonLength.ts +2 -1
- package/src/math/quadTools.ts +45 -26
- package/src/parser/parsePathString.ts +4 -4
- package/src/process/absolutizeSegment.ts +58 -0
- package/src/process/iterate.ts +33 -0
- package/src/process/normalizePath.ts +34 -28
- package/src/process/normalizeSegment.ts +8 -9
- package/src/process/projection2d.ts +2 -1
- package/src/process/relativizeSegment.ts +61 -0
- package/src/process/reversePath.ts +1 -1
- package/src/process/roundPath.ts +8 -10
- package/src/process/segmentToCubic.ts +1 -1
- package/src/process/shortenSegment.ts +3 -3
- package/src/process/splitCubic.ts +8 -7
- package/src/process/splitPath.ts +38 -4
- package/src/process/transformPath.ts +80 -73
- package/src/types.ts +35 -1
- package/src/util/getPathArea.ts +3 -3
- package/src/util/getPathBBox.ts +86 -19
- package/src/util/getPointAtLength.ts +98 -4
- package/src/util/getPropertiesAtLength.ts +2 -2
- package/src/util/getTotalLength.ts +71 -4
- package/test/class.test.ts +15 -14
- package/test/fixtures/shapes.js +27 -27
- package/test/fixtures/simpleShapes.js +18 -18
- package/test/static.test.ts +37 -17
- package/cypress.config.ts +0 -29
- package/src/process/fixArc.ts +0 -23
- package/src/process/replaceArc.ts +0 -52
- package/src/util/pathFactory.ts +0 -130
package/test/class.test.ts
CHANGED
|
@@ -121,7 +121,8 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
121
121
|
V2
|
|
122
122
|
a2 2 0 0 0-2-2
|
|
123
123
|
H2
|
|
124
|
-
z
|
|
124
|
+
z`,
|
|
125
|
+
{ origin: [8,8,24] }
|
|
125
126
|
);
|
|
126
127
|
expect(rect.segments).to.have.length(10);
|
|
127
128
|
expect(rect.origin).to.deep.equal([8,8,24]);
|
|
@@ -155,7 +156,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
155
156
|
expect(path.getAttribute('d')).to.equal(star1.toString());
|
|
156
157
|
});
|
|
157
158
|
|
|
158
|
-
it('Test rounding `
|
|
159
|
+
it('Test rounding `off`, and [0-5]', async () => {
|
|
159
160
|
const container = getMarkup();
|
|
160
161
|
wrapper.append(container);
|
|
161
162
|
await vi.waitFor(() => container.querySelector('svg'), { timeout: 200 });
|
|
@@ -163,7 +164,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
163
164
|
|
|
164
165
|
const rect = new SVGPathCommander(
|
|
165
166
|
'M2 0C0.8954304997175604 -8.780183295920349e-10 -1.3527075029566811e-16 0.8954304997175604 0 2C0 2 0 9.875 0 14C1.3527075029566811e-16 15.10456950028244 0.8954304997175604 16.000000000878018 2 16C8 16 10.25 16 14 16C15.104569499040734 15.999999999121982 16 15.104569499040734 16 14C16 8 16 5.75 16 2C16 0.8954305009592662 15.104569499040734 8.780185991465076e-10 14 0C8 0 5.75 0 2 0',
|
|
166
|
-
{ round:
|
|
167
|
+
{ round: 2 }
|
|
167
168
|
);
|
|
168
169
|
expect(rect.round).to.equal(2);
|
|
169
170
|
path.setAttribute('d', rect.toString());
|
|
@@ -171,15 +172,15 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
171
172
|
|
|
172
173
|
const rect1 = new SVGPathCommander(
|
|
173
174
|
'M7.94 7.92C7.928954 7.92 7.92 7.928954 7.92 7.94C7.92 7.94 7.92 8.01875 7.92 8.06C7.92 8.071046 7.928954 8.08 7.94 8.08C8 8.08 8.0225 8.08 8.06 8.08C8.071046 8.08 8.08 8.071046 8.08 8.06C8.08 8 8.08 7.9775 8.08 7.94C8.08 7.928954 8.071046 7.92 8.06 7.92C8 7.92 7.9775 7.92 7.94 7.92',
|
|
174
|
-
{ round: '
|
|
175
|
+
{ round: 'off' }
|
|
175
176
|
);
|
|
176
|
-
expect(rect1.round).to.equal(
|
|
177
|
+
expect(rect1.round).to.equal('off');
|
|
177
178
|
path.setAttribute('d', rect1.toString());
|
|
178
|
-
expect(path.getAttribute('d')).to.equal('M7.94 7.92C7.
|
|
179
|
+
expect(path.getAttribute('d')).to.equal('M7.94 7.92C7.928954 7.92 7.92 7.928954 7.92 7.94C7.92 7.94 7.92 8.01875 7.92 8.06C7.92 8.071046 7.928954 8.08 7.94 8.08C8 8.08 8.0225 8.08 8.06 8.08C8.071046 8.08 8.08 8.071046 8.08 8.06C8.08 8 8.08 7.9775 8.08 7.94C8.08 7.928954 8.071046 7.92 8.06 7.92C8 7.92 7.9775 7.92 7.94 7.92')
|
|
179
180
|
|
|
180
181
|
const rect2 = new SVGPathCommander(
|
|
181
182
|
'M895.02 5.12C963.38 5.12 1018.88 60.62 1018.88 128.98V895.03C1018.88 963.39 963.38 1018.89 895.02 1018.89H128.98C60.62 1018.88 5.12 963.38 5.12 895.02V128.98C5.12 60.62 60.62 5.12 128.98 5.12H895.03Z',
|
|
182
|
-
{ round:
|
|
183
|
+
{ round: 0 }
|
|
183
184
|
);
|
|
184
185
|
expect(rect2.round).to.equal(0);
|
|
185
186
|
path.setAttribute('d', rect2.toString());
|
|
@@ -221,7 +222,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
221
222
|
expect(pt1).to.deep.equal({ x: 2, y: 0 });
|
|
222
223
|
|
|
223
224
|
const pt2 = new SVGPathCommander('M2 0A0 2 0 00 0 2').getPointAtLength(0.5);
|
|
224
|
-
expect(pt2).to.deep.equal({x:
|
|
225
|
+
expect(pt2).to.deep.equal({x: 0, y: 2 });
|
|
225
226
|
|
|
226
227
|
const pt3 = new SVGPathCommander('M2 0A3 2 0 00 0 2').getPointAtLength(5);
|
|
227
228
|
expect(pt3).to.deep.equal({x: 0, y: 2});
|
|
@@ -281,7 +282,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
281
282
|
const rect = new SVGPathCommander('M2 0A2 2 0 0 0 0 2L0 14A2 2 0 0 0 2 16L14 16A2 2 0 0 0 16 14L16 2A2 2 0 0 0 14 0L2 0Z').optimize();
|
|
282
283
|
|
|
283
284
|
path.setAttribute('d', rect.toString());
|
|
284
|
-
expect(path.getAttribute('d')).to.equal('M2 0A2 2 0 0 0 0 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V2A2 2 0 0 0 14 0H2z')
|
|
285
|
+
expect(path.getAttribute('d')).to.equal('M2 0A2 2 0 0 0 0 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V2A2 2 0 0 0 14 0H2z');
|
|
285
286
|
});
|
|
286
287
|
|
|
287
288
|
it('Test reverse single path', async () => {
|
|
@@ -357,7 +358,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
357
358
|
}
|
|
358
359
|
const rect = new SVGPathCommander('M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z').transform(transform);
|
|
359
360
|
path.setAttribute('d', rect.toString());
|
|
360
|
-
expect(path.getAttribute('d')).to.equal('
|
|
361
|
+
expect(path.getAttribute('d')).to.equal('M1.829 0.5176C0.8189 0.2318 -0.1718 0.8649 -0.3837 1.9319L-2.6856 13.523C-2.8975 14.5899 -2.2504 15.6866 -1.2403 15.9725L9.734 19.0783C10.7442 19.3642 11.7349 18.731 11.9468 17.6641L14.2487 6.073C14.4606 5.006 13.8135 3.9094 12.8033 3.6235L1.829 0.5176Z')
|
|
361
362
|
});
|
|
362
363
|
|
|
363
364
|
it('Test transform with custom [x,y] origin', async () => {
|
|
@@ -373,7 +374,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
373
374
|
}
|
|
374
375
|
const rect = new SVGPathCommander('M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z').transform(transform);
|
|
375
376
|
path.setAttribute('d', rect.toString());
|
|
376
|
-
expect(path.getAttribute('d')).to.equal('M1.
|
|
377
|
+
expect(path.getAttribute('d')).to.equal('M1.829 0.5176C0.8189 0.2318 -0.1718 0.8649 -0.3837 1.9319L-2.6856 13.523C-2.8975 14.5899 -2.2504 15.6866 -1.2403 15.9725L9.734 19.0783C10.7442 19.3642 11.7349 18.731 11.9468 17.6641L14.2487 6.073C14.4606 5.006 13.8135 3.9094 12.8033 3.6235L1.829 0.5176Z')
|
|
377
378
|
});
|
|
378
379
|
|
|
379
380
|
it('Test transform with custom [x,y,z] origin option', async () => {
|
|
@@ -391,7 +392,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
391
392
|
expect(path.getAttribute('d')).to.equal('M2.2644 -1.6232C1.1515 -1.9382 -0.0487 -1.2959 -0.4093 -0.1515L-5.2306 15.1494C-5.7788 16.8892 -5.0014 18.5047 -3.5039 18.6907L10.9116 20.4811C12.0888 20.6273 13.1574 19.4458 13.3135 17.8935L14.7232 3.8815C14.8313 2.8068 14.1803 1.7491 13.2594 1.4884L2.2644 -1.6232Z');
|
|
392
393
|
});
|
|
393
394
|
|
|
394
|
-
it('Test transform with invalid origin value/option, should use [
|
|
395
|
+
it('Test transform with invalid origin value/option, should use [0,0,0]', async () => {
|
|
395
396
|
const container = getMarkup();
|
|
396
397
|
wrapper.append(container);
|
|
397
398
|
await vi.waitFor(() => container.querySelector('svg'), { timeout: 200 });
|
|
@@ -405,7 +406,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
405
406
|
// @ts-expect-error
|
|
406
407
|
const rect = new SVGPathCommander('M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z', { origin: ['a','f','-8f'] }).transform(transform);
|
|
407
408
|
path.setAttribute('d', rect.toString());
|
|
408
|
-
expect(path.getAttribute('d')).to.equal('
|
|
409
|
+
expect(path.getAttribute('d')).to.equal('M2.1949 0.6212C0.9827 0.2781 -0.2061 1.0379 -0.4604 2.3182L-3.2228 16.2276C-3.477 17.5079 -2.7005 18.8239 -1.4883 19.1669L11.6808 22.8939C12.893 23.237 14.0818 22.4772 14.3361 21.1969L17.0985 7.2875C17.3527 6.0072 16.5762 4.6912 15.364 4.3482L2.1949 0.6212Z');
|
|
409
410
|
|
|
410
411
|
const transform1 = {
|
|
411
412
|
rotate: [15,15],
|
|
@@ -416,7 +417,7 @@ a1.63 1.63 0 0 0 -0.906 0.274a1.63 1.63 0 0 0 -0.601 0.73a1.63 1.63 0 0 0 -0.094
|
|
|
416
417
|
// @ts-expect-error
|
|
417
418
|
const rect1 = new SVGPathCommander('M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2z').transform(transform1);
|
|
418
419
|
path.setAttribute('d', rect1.toString());
|
|
419
|
-
expect(path.getAttribute('d')).to.equal('
|
|
420
|
+
expect(path.getAttribute('d')).to.equal('M2.1949 0.6212C0.9827 0.2781 -0.2061 1.0379 -0.4604 2.3182L-3.2228 16.2276C-3.477 17.5079 -2.7005 18.8239 -1.4883 19.1669L11.6808 22.8939C12.893 23.237 14.0818 22.4772 14.3361 21.1969L17.0985 7.2875C17.3527 6.0072 16.5762 4.6912 15.364 4.3482L2.1949 0.6212Z');
|
|
420
421
|
});
|
|
421
422
|
|
|
422
423
|
simpleShapes.initial.forEach((shape, i) => {
|
package/test/fixtures/shapes.js
CHANGED
|
@@ -20,24 +20,24 @@ const shapes = {
|
|
|
20
20
|
"M8.66 8.66L8.66 4.66L7.34 4.66L7.34 8.66L8.65 8.66ZM8.66 11.34L8.66 10L7.34 10L7.34 11.34L8.65 11.34ZM8 1.34Q10.75 1.34 12.7 3.29Q14.65 5.24 14.66 8Q14.67 10.76 12.71 12.7Q10.75 14.64 8 14.66Q5.25 14.68 3.3 12.7Q1.35 10.72 1.34 8Q1.33 5.28 3.3 3.3Q5.27 1.32 8 1.34Z"
|
|
21
21
|
],
|
|
22
22
|
optimized: [
|
|
23
|
-
"M16 8C16 4.13 12.42 1 8 1S0 4.13 0 8c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.
|
|
24
|
-
"M16 14V5H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zM2.56 12.33H1.85L3.75 7h0.
|
|
25
|
-
"M5.5 0.5A0.5 0.5 0 0 1 6 0h4a0.5 0.5 0 0 1 0 1H9v1.07a7 7 0 0 1 3.54 12.26l0.
|
|
26
|
-
"M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H2A2 2 0 0 1 0 14V2A2 2 0 0 1 2
|
|
27
|
-
"M2 4A2 2 0 0 0 0 6v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V6A2 2 0 0 0 14 4h-1.17A2 2 0 0 1 11.41 3.41L10.59 2.59A2 2 0 0 0 9.17 2H6.83A2 2 0 0 0 5.41 2.59L4.59 3.41A2 2 0 0 1 3.17
|
|
28
|
-
"M2 0A2 2 0 0 0 0 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V2A2 2 0 0 0 14
|
|
23
|
+
"M16 8C16 4.13 12.42 1 8 1S0 4.13 0 8c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.18 0.07 0.39 0.27 0.36c2.26 -0.37 3.6 -0.94 4.18 -1.24A9.06 9.06 0 0 0 8 15c4.42 0 8 -3.13 8 -7zM7.19 6.77c0.09 0.12 0.17 0.26 0.23 0.4c0.43 0.94 0.39 2.37 -0.94 3.7a0.45 0.45 0 0 1 -0.61 0.01A0.41 0.41 0 0 1 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67S4.78 6 5.73 6c0.28 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.32 0.18 0.47 0.32c0.08 0.09 0.16 0.18 0.22 0.28zM11 9.07c-0.27 0.17 -0.59 0.26 -0.93 0.26C9.11 9.33 8.34 8.59 8.34 7.67S9.11 6 10.07 6c0.27 0 0.53 0.06 0.75 0.17l0.01 0C11 6.24 11.16 6.35 11.3 6.49c0.09 0.09 0.16 0.18 0.23 0.27c0.08 0.13 0.16 0.26 0.22 0.4c0.43 0.95 0.4 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59C10.61 9.87 10.86 9.46 11 9.07z",
|
|
24
|
+
"M16 14V5H0v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zM2.56 12.33H1.85L3.75 7h0.69l1.9 5.33H5.62l-0.54 -1.6H3.1l-0.54 1.6zM4.1 7.81H4.08l-0.8 2.37H4.9L4.1 7.81zm5.75 0.42v4.1H9.18v-0.54H9.16C9.01 12.12 8.62 12.4 7.97 12.4c-0.85 0 -1.46 -0.49 -1.46 -1.43V8.23h0.68v2.55c0 0.77 0.44 1.01 0.98 1.01c0.59 0 1 -0.37 1 -1.02V8.23h0.68zm1.27 4.41c0.08 0.33 0.43 0.63 0.99 0.63c0.65 0 1.07 -0.37 1.07 -1.02v-0.6h-0.02C13 12 12.55 12.29 11.99 12.29c-0.96 0 -1.64 -0.67 -1.64 -1.9v-0.34c0 -1.21 0.67 -1.89 1.64 -1.89c0.56 0 1 0.3 1.19 0.64h0.02V8.23h0.65v4.03c0 1.05 -0.82 1.58 -1.75 1.58c-1.04 0 -1.57 -0.52 -1.66 -1.2h0.68zm2.06 -2.54c0 -0.83 -0.42 -1.36 -1.06 -1.36c-0.7 0 -1.1 0.49 -1.1 1.36v0.26c0 0.85 0.4 1.36 1.1 1.36c0.67 0 1.06 -0.52 1.06 -1.36V10.1zM4 0.5a0.5 0.5 0 0 0 -1 0V1H2A2 2 0 0 0 0 3v1h16V3A2 2 0 0 0 14 1h-1V0.5a0.5 0.5 0 0 0 -1 0V1H4V0.5z",
|
|
25
|
+
"M5.5 0.5A0.5 0.5 0 0 1 6 0h4a0.5 0.5 0 0 1 0 1H9v1.07a7 7 0 0 1 3.54 12.26l0.81 0.82a0.5 0.5 0 0 1 -0.7 0.7l-0.93 -0.92A6.97 6.97 0 0 1 8 16A6.97 6.97 0 0 1 4.28 14.93l-0.93 0.92a0.5 0.5 0 0 1 -0.7 -0.7l0.81 -0.82A7 7 0 0 1 7 2.07V1H6A0.5 0.5 0 0 1 5.5 0.5zM0.86 5.39A2.5 2.5 0 1 1 4.39 1.86A8.04 8.04 0 0 0 0.86 5.39zM13.5 1c-0.75 0 -1.43 0.33 -1.89 0.86a8.04 8.04 0 0 1 3.53 3.53A2.5 2.5 0 0 0 13.5 1zm-5 4a0.5 0.5 0 0 0 -1 0v3.88l-1.45 2.9a0.5 0.5 0 1 0 0.9 0.44l1.5 -3A0.5 0.5 0 0 0 8.5 9V5z",
|
|
26
|
+
"M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2H2A2 2 0 0 1 0 14V2A2 2 0 0 1 2 0zm3.35 4.65a0.5 0.5 0 1 0 -0.7 0.7L7.29 8l-2.64 2.65a0.5 0.5 0 0 0 0.7 0.7L8 8.71l2.65 2.64a0.5 0.5 0 0 0 0.7 -0.7L8.71 8l2.64 -2.65a0.5 0.5 0 0 0 -0.7 -0.7L8 7.29L5.35 4.65z",
|
|
27
|
+
"M2 4A2 2 0 0 0 0 6v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V6A2 2 0 0 0 14 4h-1.17A2 2 0 0 1 11.41 3.41L10.59 2.59A2 2 0 0 0 9.17 2H6.83A2 2 0 0 0 5.41 2.59L4.59 3.41A2 2 0 0 1 3.17 4H2zm8.5 4.5a2.5 2.5 0 0 0 -5 0a2.5 2.5 0 1 0 5 0zM2.5 6a0.5 0.5 0 0 1 0 -1a0.5 0.5 0 1 1 0 1zm9 2.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z",
|
|
28
|
+
"M2 0A2 2 0 0 0 0 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2V2A2 2 0 0 0 14 0H2zm7.5 11h-4A0.5 0.5 0 0 1 5 10.5v-4a0.5 0.5 0 0 1 1 0v2.79l4.15 -4.14a0.5 0.5 0 0 1 0.7 0.7L6.71 10H9.5a0.5 0.5 0 0 1 0 1z",
|
|
29
29
|
"M15.98 8.51c-0.38 6.15 -7.27 9.57 -12.4 6.17C3.27 14.47 2.98 14.25 2.71 14.01l5.5 -5.5h7.78zM2 13.3L7.5 7.8V0.03C1.35 0.41 -2.07 7.3 1.33 12.43c0.2 0.3 0.42 0.59 0.67 0.87zM8.5 0.03c4.02 0.25 7.23 3.46 7.49 7.49H8.5V0.03z",
|
|
30
|
-
"M8.66 8.66v-4H7.34v4h1.
|
|
30
|
+
"M8.66 8.66v-4H7.34v4h1.31zm0 2.68V10H7.34v1.34h1.31zM8 1.34q2.75 0 4.7 1.95T14.66 8t-1.95 4.7T8 14.66T3.3 12.7T1.34 8T3.3 3.3T8 1.34z"
|
|
31
31
|
],
|
|
32
32
|
relative: [
|
|
33
|
-
"M16 8c0 -3.87 -3.58 -7 -8 -7s-8 3.13 -8 7c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.19 0.07 0.39 0.27 0.36c2.26 -0.37 3.6 -0.94 4.18 -1.23a9.06 9.06 0 0 0 2.35 0.31c4.42 0 8 -3.13 8 -
|
|
34
|
-
"M16 14v-9h-16v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -
|
|
35
|
-
"M5.5 0.5a0.5 0.5 0 0 1 0.5 -0.5h4a0.5 0.5 0 0 1 0 1h-1v1.07a7 7 0 0 1 3.54 12.26l0.82 0.82a0.5 0.5 0 0 1 -0.71 0.71l-0.92 -0.92a6.97 6.97 0 0 1 -3.72 1.07a6.97 6.97 0 0 1 -3.72 -1.07l-0.92 0.92a0.5 0.5 0 0 1 -0.71 -0.71l0.82 -0.82a7 7 0 0 1 3.54 -12.26v-1.07h-1a0.5 0.5 0 0 1 -0.5 -0.
|
|
33
|
+
"M16 8c0 -3.87 -3.58 -7 -8 -7s-8 3.13 -8 7c0 1.76 0.74 3.37 1.97 4.6c-0.1 1.02 -0.42 2.13 -0.77 2.97c-0.08 0.19 0.07 0.39 0.27 0.36c2.26 -0.37 3.6 -0.94 4.18 -1.23a9.06 9.06 0 0 0 2.35 0.31c4.42 0 8 -3.13 8 -7zm-8.81 -1.23c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59c0.42 -0.42 0.67 -0.83 0.81 -1.22c-0.27 0.17 -0.59 0.26 -0.93 0.26c-0.96 0 -1.74 -0.75 -1.74 -1.67c0 -0.92 0.78 -1.67 1.73 -1.67c0.27 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.33 0.18 0.47 0.32c0.08 0.08 0.16 0.17 0.23 0.27zm3.81 2.31c-0.27 0.16 -0.59 0.26 -0.93 0.26c-0.96 0 -1.73 -0.75 -1.73 -1.67c0 -0.92 0.78 -1.67 1.73 -1.67c0.27 0 0.53 0.06 0.76 0.17l0.01 0c0.17 0.07 0.33 0.18 0.47 0.32c0.09 0.08 0.16 0.17 0.23 0.27c0.09 0.12 0.16 0.26 0.23 0.4c0.43 0.95 0.39 2.38 -0.94 3.71a0.45 0.45 0 0 1 -0.61 0.01a0.41 0.41 0 0 1 -0.01 -0.59c0.42 -0.42 0.67 -0.83 0.81 -1.22z",
|
|
34
|
+
"M16 14v-9h-16v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zm-13.44 -1.67h-0.71l1.9 -5.33h0.7l1.9 5.33h-0.72l-0.54 -1.6h-1.98l-0.54 1.6zm1.54 -4.53h-0.02l-0.8 2.38h1.62l-0.8 -2.37zm5.75 0.42v4.11h-0.67v-0.54h-0.03c-0.14 0.33 -0.53 0.61 -1.19 0.61c-0.85 0 -1.45 -0.48 -1.45 -1.42v-2.75h0.68v2.55c0 0.77 0.44 1.01 0.98 1.01c0.59 0 1 -0.37 1 -1.02v-2.54h0.68zm1.27 4.41c0.08 0.33 0.42 0.64 0.99 0.64c0.65 0 1.07 -0.38 1.07 -1.02v-0.6h-0.02c-0.16 0.36 -0.61 0.65 -1.17 0.65c-0.96 0 -1.64 -0.67 -1.64 -1.9v-0.34c0 -1.21 0.68 -1.89 1.64 -1.89c0.56 0 1 0.29 1.2 0.64h0.02v-0.58h0.65v4.03c0 1.05 -0.82 1.58 -1.75 1.58c-1.04 0 -1.57 -0.52 -1.67 -1.2h0.69zm2.06 -2.53c0 -0.83 -0.41 -1.36 -1.06 -1.36c-0.69 0 -1.1 0.49 -1.1 1.36v0.25c0 0.85 0.41 1.36 1.1 1.36c0.67 0 1.06 -0.52 1.06 -1.36v-0.25zm-9.18 -9.6a0.5 0.5 0 0 0 -1 0v0.5h-1a2 2 0 0 0 -2 2v1h16v-1a2 2 0 0 0 -2 -2h-1v-0.5a0.5 0.5 0 0 0 -1 0v0.5h-8v-0.5z",
|
|
35
|
+
"M5.5 0.5a0.5 0.5 0 0 1 0.5 -0.5h4a0.5 0.5 0 0 1 0 1h-1v1.07a7 7 0 0 1 3.54 12.26l0.82 0.82a0.5 0.5 0 0 1 -0.71 0.71l-0.92 -0.92a6.97 6.97 0 0 1 -3.72 1.07a6.97 6.97 0 0 1 -3.72 -1.07l-0.92 0.92a0.5 0.5 0 0 1 -0.71 -0.71l0.82 -0.82a7 7 0 0 1 3.54 -12.26v-1.07h-1a0.5 0.5 0 0 1 -0.5 -0.5zm-4.64 4.89a2.5 2.5 0 1 1 3.53 -3.53a8.04 8.04 0 0 0 -3.53 3.53zm12.64 -4.39c-0.75 0 -1.43 0.33 -1.89 0.86a8.04 8.04 0 0 1 3.53 3.53a2.5 2.5 0 0 0 -1.64 -4.39zm-5 4a0.5 0.5 0 0 0 -1 0v3.88l-1.45 2.89a0.5 0.5 0 1 0 0.89 0.45l1.5 -3a0.5 0.5 0 0 0 0.05 -0.22v-4z",
|
|
36
36
|
"M2 0h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2zm3.35 4.65a0.5 0.5 0 1 0 -0.71 0.71l2.65 2.65l-2.65 2.65a0.5 0.5 0 0 0 0.71 0.71l2.65 -2.65l2.65 2.65a0.5 0.5 0 0 0 0.71 -0.71l-2.65 -2.65l2.65 -2.65a0.5 0.5 0 0 0 -0.71 -0.71l-2.65 2.65l-2.65 -2.65z",
|
|
37
|
-
"M2 4a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-6a2 2 0 0 0 -2 -2h-1.17a2 2 0 0 1 -1.41 -0.59l-0.83 -0.83a2 2 0 0 0 -1.41 -0.59h-2.34a2 2 0 0 0 -1.41 0.59l-0.83 0.83a2 2 0 0 1 -1.41 0.59h-1.
|
|
37
|
+
"M2 4a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-6a2 2 0 0 0 -2 -2h-1.17a2 2 0 0 1 -1.41 -0.59l-0.83 -0.83a2 2 0 0 0 -1.41 -0.59h-2.34a2 2 0 0 0 -1.41 0.59l-0.83 0.83a2 2 0 0 1 -1.41 0.59h-1.17zm8.5 4.5a2.5 2.5 0 0 0 -5 0a2.5 2.5 0 1 0 5 0zm-8 -2.5a0.5 0.5 0 0 1 0 -1a0.5 0.5 0 1 1 0 1zm9 2.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z",
|
|
38
38
|
"M2 0a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-12a2 2 0 0 0 -2 -2h-12zm7.5 11h-4a0.5 0.5 0 0 1 -0.5 -0.5v-4a0.5 0.5 0 0 1 1 0v2.79l4.15 -4.15a0.5 0.5 0 0 1 0.71 0.71l-4.15 4.15h2.79a0.5 0.5 0 0 1 0 1z",
|
|
39
|
-
"M15.98 8.51c-0.38 6.15 -7.27 9.57 -12.4 6.17c-0.31 -0.21 -0.6 -0.43 -0.87 -0.67l5.5 -5.5h7.
|
|
40
|
-
"M8.66 8.66v-4h-1.32v4h1.
|
|
39
|
+
"M15.98 8.51c-0.38 6.15 -7.27 9.57 -12.4 6.17c-0.31 -0.21 -0.6 -0.43 -0.87 -0.67l5.5 -5.5h7.78zm-13.98 4.79l5.5 -5.5v-7.77c-6.15 0.38 -9.57 7.27 -6.17 12.4c0.2 0.3 0.42 0.59 0.67 0.87zm6.5 -13.27c4.02 0.25 7.23 3.46 7.49 7.49h-7.49v-7.49z",
|
|
40
|
+
"M8.66 8.66v-4h-1.32v4h1.31zm0 2.68v-1.34h-1.32v1.34h1.31zm-0.66 -10q2.75 0 4.7 1.95t1.96 4.71t-1.95 4.7t-4.71 1.96t-4.7 -1.96t-1.96 -4.7t1.96 -4.7t4.7 -1.96z"
|
|
41
41
|
],
|
|
42
42
|
absolute: [
|
|
43
43
|
"M16 8C16 4.13 12.42 1 8 1S0 4.13 0 8C0 9.76 0.74 11.37 1.97 12.6C1.87 13.62 1.55 14.73 1.2 15.57C1.12 15.75 1.27 15.96 1.47 15.93C3.73 15.56 5.07 14.99 5.65 14.69A9.06 9.06 0 0 0 8 15C12.42 15 16 11.87 16 8ZM7.19 6.77C7.28 6.89 7.36 7.03 7.42 7.17C7.85 8.11 7.81 9.54 6.48 10.87A0.45 0.45 0 0 1 5.87 10.88A0.41 0.41 0 0 1 5.86 10.29C6.27 9.88 6.53 9.46 6.67 9.07C6.4 9.24 6.08 9.33 5.74 9.33C4.78 9.33 4 8.59 4 7.67C4 6.75 4.78 6 5.73 6C6.01 6 6.26 6.06 6.49 6.17L6.5 6.17C6.67 6.24 6.82 6.35 6.97 6.49C7.05 6.58 7.13 6.67 7.19 6.77ZM11 9.07C10.73 9.24 10.41 9.33 10.07 9.33C9.11 9.33 8.34 8.59 8.34 7.67C8.34 6.75 9.11 6 10.07 6C10.34 6 10.6 6.06 10.82 6.17L10.83 6.17C11 6.24 11.16 6.35 11.3 6.49C11.39 6.58 11.46 6.67 11.53 6.76C11.61 6.89 11.69 7.02 11.75 7.16C12.18 8.11 12.15 9.54 10.81 10.87A0.45 0.45 0 0 1 10.2 10.88A0.41 0.41 0 0 1 10.19 10.29C10.61 9.87 10.86 9.46 11 9.07Z",
|
|
@@ -56,18 +56,18 @@ const shapes = {
|
|
|
56
56
|
"M2 0C6 0 10 0 14 0C15.1 0 16 0.9 16 2C16 6 16 10 16 14C16 15.1 15.1 16 14 16C10 16 6 16 2 16C0.9 16 0 15.1 0 14C0 10 0 6 0 2C0 0.9 0.9 0 2 0C2 0 2 0 2 0M5.35 4.65C5.08 4.37 4.62 4.5 4.52 4.87C4.47 5.04 4.52 5.23 4.65 5.35C5.53 6.24 6.41 7.12 7.29 8C6.41 8.88 5.53 9.76 4.65 10.65C4.37 10.92 4.5 11.38 4.87 11.48C5.04 11.53 5.23 11.48 5.35 11.35C6.24 10.47 7.12 9.59 8 8.71C8.88 9.59 9.76 10.47 10.65 11.35C10.92 11.63 11.38 11.5 11.48 11.13C11.53 10.96 11.48 10.77 11.35 10.65C10.47 9.76 9.59 8.88 8.71 8C9.59 7.12 10.47 6.24 11.35 5.35C11.63 5.08 11.5 4.62 11.13 4.52C10.96 4.47 10.77 4.52 10.65 4.65C9.76 5.53 8.88 6.41 8 7.29C7.12 6.41 6.24 5.53 5.35 4.65C5.35 4.65 5.35 4.65 5.35 4.65",
|
|
57
57
|
"M2 4C0.9 4 0 4.9 0 6C0 8 0 10 0 12C0 13.1 0.9 14 2 14C6 14 10 14 14 14C15.1 14 16 13.1 16 12C16 10 16 8 16 6C16 4.9 15.1 4 14 4C13.61 4 13.22 4 12.83 4C12.3 4 11.79 3.79 11.41 3.41C11.14 3.14 10.86 2.86 10.59 2.59C10.21 2.21 9.7 2 9.17 2C8.39 2 7.61 2 6.83 2C6.3 2 5.79 2.21 5.41 2.59C5.14 2.86 4.86 3.14 4.59 3.41C4.21 3.79 3.7 4 3.17 4C2.78 4 2.39 4 2 4C2 4 2 4 2 4M10.5 8.5C10.5 6.58 8.42 5.37 6.75 6.33C5.98 6.78 5.5 7.61 5.5 8.5C5.5 10.42 7.58 11.63 9.25 10.67C10.02 10.22 10.5 9.39 10.5 8.5C10.5 8.5 10.5 8.5 10.5 8.5M2.5 6C2.12 6 1.87 5.58 2.07 5.25C2.16 5.1 2.32 5 2.5 5C2.88 5 3.13 5.42 2.93 5.75C2.84 5.9 2.68 6 2.5 6C2.5 6 2.5 6 2.5 6M11.5 8.5C11.5 11.19 8.58 12.88 6.25 11.53C5.17 10.91 4.5 9.75 4.5 8.5C4.5 5.81 7.42 4.12 9.75 5.47C10.83 6.09 11.5 7.25 11.5 8.5C11.5 8.5 11.5 8.5 11.5 8.5",
|
|
58
58
|
"M2 0C0.9 0 0 0.9 0 2C0 6 0 10 0 14C0 15.1 0.9 16 2 16C6 16 10 16 14 16C15.1 16 16 15.1 16 14C16 10 16 6 16 2C16 0.9 15.1 0 14 0C10 0 6 0 2 0C2 0 2 0 2 0M9.5 11C8.17 11 6.83 11 5.5 11C5.22 11 5 10.78 5 10.5C5 9.17 5 7.83 5 6.5C5 6.12 5.42 5.87 5.75 6.07C5.9 6.16 6 6.32 6 6.5C6 7.43 6 8.36 6 9.29C7.38 7.91 8.76 6.53 10.15 5.15C10.42 4.87 10.88 5 10.98 5.37C11.03 5.54 10.98 5.73 10.85 5.85C9.47 7.24 8.09 8.62 6.71 10C7.64 10 8.57 10 9.5 10C9.88 10 10.13 10.42 9.93 10.75C9.84 10.9 9.68 11 9.5 11C9.5 11 9.5 11 9.5 11",
|
|
59
|
-
"M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01C4.54 12.18 6.38 10.34 8.21 8.51C10.8 8.51 13.4 8.51 15.99 8.51C15.99 8.51 15.
|
|
60
|
-
"M8.66 8.66C8.66 7.33 8.66 5.99 8.66 4.66C8.22 4.66 7.78 4.66 7.34 4.66C7.34 5.99 7.34 7.33 7.34 8.66C7.78 8.66 8.21 8.66 8.65 8.66C8.65 8.66 8.
|
|
59
|
+
"M15.98 8.51C15.6 14.66 8.71 18.08 3.58 14.68C3.27 14.47 2.98 14.25 2.71 14.01C4.54 12.18 6.38 10.34 8.21 8.51C10.8 8.51 13.4 8.51 15.99 8.51C15.99 8.51 15.99 8.51 15.99 8.51M2 13.3C3.83 11.47 5.67 9.63 7.5 7.8C7.5 5.21 7.5 2.62 7.5 0.03C1.35 0.41 -2.07 7.3 1.33 12.43C1.53 12.73 1.75 13.02 2 13.3C2 13.3 2 13.3 2 13.3M8.5 0.03C12.52 0.28 15.73 3.49 15.99 7.52C13.49 7.52 11 7.52 8.5 7.52C8.5 5.02 8.5 2.53 8.5 0.03C8.5 0.03 8.5 0.03 8.5 0.03",
|
|
60
|
+
"M8.66 8.66C8.66 7.33 8.66 5.99 8.66 4.66C8.22 4.66 7.78 4.66 7.34 4.66C7.34 5.99 7.34 7.33 7.34 8.66C7.78 8.66 8.21 8.66 8.65 8.66C8.65 8.66 8.65 8.66 8.65 8.66M8.66 11.34C8.66 10.89 8.66 10.45 8.66 10C8.22 10 7.78 10 7.34 10C7.34 10.45 7.34 10.89 7.34 11.34C7.78 11.34 8.21 11.34 8.65 11.34C8.65 11.34 8.65 11.34 8.65 11.34M8 1.34C9.83 1.34 11.4 1.99 12.7 3.29C14 4.59 14.65 6.16 14.66 8C14.67 9.84 14.02 11.41 12.71 12.7C11.4 13.99 9.83 14.65 8 14.66C6.17 14.67 4.6 14.02 3.3 12.7C2 11.38 1.35 9.81 1.34 8C1.33 6.19 1.99 4.62 3.3 3.3C4.61 1.98 6.18 1.33 8 1.34C8 1.34 8 1.34 8 1.34"
|
|
61
61
|
],
|
|
62
62
|
scaled: [
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
63
|
+
"M14.4 7.2C14.4 3.72 11.18 0.9 7.2 0.9S0 3.72 0 7.2C0 8.78 0.67 10.23 1.77 11.34C1.69 12.25 1.4 13.26 1.08 14.01C1.01 14.18 1.14 14.36 1.32 14.34C3.35 14 4.56 13.49 5.09 13.22C5.78 13.41 6.49 13.5 7.2 13.5C11.18 13.5 14.4 10.68 14.4 7.2ZM6.47 6.09C6.55 6.2 6.62 6.32 6.68 6.45C7.06 7.3 7.03 8.59 5.83 9.78C5.68 9.93 5.44 9.94 5.28 9.79C5.13 9.65 5.12 9.41 5.27 9.26C5.65 8.89 5.88 8.52 6 8.16C5.76 8.31 5.47 8.4 5.16 8.4C4.3 8.4 3.6 7.73 3.6 6.9C3.6 6.07 4.3 5.4 5.16 5.4C5.4 5.4 5.64 5.45 5.84 5.55L5.85 5.55C6 5.62 6.14 5.72 6.27 5.84C6.35 5.92 6.41 6 6.47 6.09ZM9.9 8.17C9.66 8.31 9.37 8.4 9.06 8.4C8.2 8.4 7.5 7.73 7.5 6.9C7.5 6.07 8.2 5.4 9.06 5.4C9.31 5.4 9.54 5.45 9.74 5.55L9.75 5.55C9.9 5.62 10.04 5.72 10.17 5.84C10.25 5.92 10.31 6 10.37 6.09C10.45 6.2 10.52 6.32 10.58 6.45C10.96 7.3 10.93 8.59 9.73 9.78C9.58 9.93 9.34 9.93 9.18 9.79C9.03 9.65 9.02 9.41 9.17 9.26C9.55 8.89 9.77 8.51 9.9 8.16Z",
|
|
64
|
+
"M14.4 12.6V4.5H0V12.6C0 13.59 0.81 14.4 1.8 14.4H12.6C13.59 14.4 14.4 13.59 14.4 12.6ZM2.3 11.1H1.67L3.37 6.3H4L5.71 11.1H5.06L4.58 9.66H2.79L2.3 11.1ZM3.69 7.02H3.68L2.96 9.16H4.41L3.69 7.02ZM8.87 7.4V11.1H8.26V10.61H8.24C8.11 10.91 7.76 11.16 7.17 11.16C6.41 11.16 5.86 10.72 5.86 9.88V7.4H6.47V9.7C6.47 10.39 6.87 10.61 7.35 10.61C7.88 10.61 8.26 10.28 8.26 9.69V7.4H8.87ZM10.01 11.37C10.08 11.67 10.39 11.95 10.9 11.95C11.48 11.95 11.86 11.61 11.86 11.03V10.48H11.84C11.7 10.8 11.29 11.06 10.79 11.06C9.93 11.06 9.31 10.46 9.31 9.35V9.05C9.31 7.96 9.92 7.35 10.79 7.35C11.29 7.35 11.69 7.61 11.86 7.92H11.88V7.4H12.47V11.03C12.47 11.98 11.73 12.45 10.89 12.45C9.95 12.45 9.48 11.99 9.39 11.37H10.01ZM11.86 9.09C11.86 8.34 11.49 7.87 10.9 7.87C10.28 7.87 9.92 8.31 9.92 9.09V9.32C9.92 10.09 10.28 10.55 10.9 10.55C11.51 10.55 11.86 10.08 11.86 9.32V9.09ZM3.6 0.45C3.6 0.1 3.23 -0.11 2.93 0.06C2.79 0.14 2.7 0.29 2.7 0.45V0.9H1.8C0.81 0.9 0 1.71 0 2.7V3.6H14.4V2.7C14.4 1.71 13.59 0.9 12.6 0.9H11.7V0.45C11.7 0.1 11.33 -0.11 11.03 0.06C10.89 0.14 10.8 0.29 10.8 0.45V0.9H3.6V0.45Z",
|
|
65
|
+
"M4.95 0.45C4.95 0.2 5.15 0 5.4 0H9C9.35 0 9.56 0.37 9.39 0.68C9.31 0.81 9.16 0.9 9 0.9H8.1V1.86C12.9 2.56 15.15 8.19 12.15 12C11.89 12.33 11.6 12.63 11.28 12.9L12.02 13.63C12.26 13.88 12.15 14.3 11.82 14.39C11.66 14.43 11.5 14.38 11.38 14.27L10.55 13.44C9.55 14.07 8.39 14.4 7.2 14.4C6.01 14.4 4.85 14.07 3.85 13.44L3.02 14.27C2.77 14.51 2.35 14.4 2.26 14.07C2.22 13.91 2.27 13.75 2.38 13.63L3.12 12.9C-0.58 9.75 0.52 3.79 5.09 2.16C5.48 2.02 5.89 1.92 6.3 1.86V0.9H5.4C5.15 0.9 4.95 0.7 4.95 0.45ZM0.77 4.85C-0.53 3.71 -0.12 1.59 1.52 1.02C2.39 0.72 3.35 0.98 3.95 1.67C2.58 2.37 1.47 3.48 0.77 4.85ZM12.15 0.9C11.47 0.9 10.86 1.2 10.45 1.67C11.82 2.37 12.93 3.48 13.63 4.85C14.93 3.71 14.52 1.59 12.88 1.02C12.65 0.94 12.4 0.9 12.15 0.9ZM7.65 4.5C7.65 4.15 7.28 3.94 6.98 4.11C6.84 4.19 6.75 4.34 6.75 4.5V7.99L5.45 10.6C5.29 10.91 5.53 11.27 5.87 11.25C6.03 11.24 6.18 11.15 6.25 11L7.6 8.3C7.63 8.24 7.65 8.17 7.65 8.1V4.5Z",
|
|
66
|
+
"M1.8 0H12.6C13.59 0 14.4 0.81 14.4 1.8V12.6C14.4 13.59 13.59 14.4 12.6 14.4H1.8C0.81 14.4 0 13.59 0 12.6V1.8C0 0.81 0.81 0 1.8 0ZM4.82 4.18C4.57 3.94 4.15 4.05 4.06 4.38C4.02 4.54 4.07 4.7 4.18 4.82L6.56 7.2L4.18 9.58C3.94 9.83 4.05 10.25 4.38 10.34C4.54 10.38 4.7 10.33 4.82 10.22L7.2 7.84L9.58 10.22C9.83 10.46 10.25 10.35 10.34 10.02C10.38 9.86 10.33 9.7 10.22 9.58L7.84 7.2L10.22 4.82C10.46 4.57 10.35 4.15 10.02 4.06C9.86 4.02 9.7 4.07 9.58 4.18L7.2 6.56L4.82 4.18Z",
|
|
67
|
+
"M1.8 3.6C0.81 3.6 0 4.41 0 5.4V10.8C0 11.79 0.81 12.6 1.8 12.6H12.6C13.59 12.6 14.4 11.79 14.4 10.8V5.4C14.4 4.41 13.59 3.6 12.6 3.6H11.55C11.07 3.6 10.61 3.41 10.27 3.07L9.53 2.33C9.19 1.99 8.73 1.8 8.25 1.8H6.15C5.67 1.8 5.21 1.99 4.87 2.33L4.13 3.07C3.79 3.41 3.33 3.6 2.85 3.6H1.8ZM9.45 7.65C9.45 5.92 7.57 4.84 6.08 5.7C5.38 6.1 4.95 6.85 4.95 7.65C4.95 9.38 6.83 10.46 8.33 9.6C9.02 9.2 9.45 8.45 9.45 7.65ZM2.25 5.4C1.9 5.4 1.69 5.02 1.86 4.73C1.94 4.59 2.09 4.5 2.25 4.5C2.6 4.5 2.81 4.88 2.64 5.18C2.56 5.31 2.41 5.4 2.25 5.4ZM10.35 7.65C10.35 10.07 7.73 11.59 5.63 10.38C4.65 9.82 4.05 8.78 4.05 7.65C4.05 5.23 6.68 3.71 8.78 4.92C9.75 5.48 10.35 6.52 10.35 7.65Z",
|
|
68
|
+
"M1.8 0C0.81 0 0 0.81 0 1.8V12.6C0 13.59 0.81 14.4 1.8 14.4H12.6C13.59 14.4 14.4 13.59 14.4 12.6V1.8C14.4 0.81 13.59 0 12.6 0H1.8ZM8.55 9.9H4.95C4.7 9.9 4.5 9.7 4.5 9.45V5.85C4.5 5.5 4.88 5.29 5.18 5.46C5.31 5.54 5.4 5.69 5.4 5.85V8.36L9.13 4.63C9.38 4.39 9.8 4.5 9.89 4.83C9.93 4.99 9.88 5.15 9.77 5.27L6.04 9H8.55C8.9 9 9.11 9.38 8.94 9.68C8.86 9.81 8.71 9.9 8.55 9.9Z",
|
|
69
|
+
"M14.38 7.66C14.04 13.19 7.84 16.27 3.22 13.21C2.94 13.02 2.68 12.83 2.44 12.61L7.39 7.66H14.39ZM1.8 11.97L6.75 7.02V0.03C1.22 0.37 -1.86 6.57 1.2 11.19C1.38 11.46 1.58 11.72 1.8 11.97ZM7.65 0.03C11.27 0.25 14.16 3.14 14.39 6.77H7.65V0.03Z",
|
|
70
|
+
"M7.79 7.79V4.19H6.61V7.79H7.79ZM7.79 10.21V9H6.61V10.21H7.79ZM7.2 1.21Q9.68 1.21 11.43 2.96T13.19 7.2T11.44 11.43T7.2 13.19T2.97 11.43T1.21 7.2T2.97 2.97T7.2 1.21Z"
|
|
71
71
|
],
|
|
72
72
|
translated: [
|
|
73
73
|
"M17 9C17 5.13 13.42 2 9 2S1 5.13 1 9C1 10.76 1.74 12.37 2.97 13.6C2.87 14.62 2.55 15.73 2.2 16.57C2.12 16.75 2.27 16.96 2.47 16.93C4.73 16.56 6.07 15.99 6.65 15.69C7.42 15.9 8.21 16 9 16C13.42 16 17 12.87 17 9ZM8.19 7.77C8.28 7.89 8.36 8.03 8.42 8.17C8.85 9.11 8.81 10.54 7.48 11.87C7.31 12.04 7.04 12.04 6.87 11.88C6.7 11.72 6.69 11.46 6.86 11.29C7.27 10.88 7.53 10.46 7.67 10.07C7.4 10.24 7.08 10.33 6.74 10.33C5.78 10.33 5 9.59 5 8.67C5 7.75 5.78 7 6.73 7C7.01 7 7.26 7.06 7.49 7.17L7.5 7.17C7.67 7.24 7.82 7.35 7.97 7.49C8.05 7.58 8.13 7.67 8.19 7.77ZM12 10.07C11.73 10.24 11.41 10.33 11.07 10.33C10.11 10.33 9.34 9.59 9.34 8.67C9.34 7.75 10.11 7 11.07 7C11.34 7 11.6 7.06 11.82 7.17L11.83 7.17C12 7.24 12.16 7.35 12.3 7.49C12.39 7.58 12.46 7.67 12.53 7.76C12.61 7.89 12.69 8.02 12.75 8.16C13.18 9.11 13.15 10.54 11.81 11.87C11.64 12.03 11.37 12.04 11.2 11.88C11.03 11.72 11.02 11.45 11.19 11.29C11.61 10.87 11.86 10.46 12 10.07Z",
|
|
@@ -82,7 +82,7 @@ const shapes = {
|
|
|
82
82
|
length: [
|
|
83
83
|
81.67071892681327,
|
|
84
84
|
170.27898053351782,
|
|
85
|
-
103.
|
|
85
|
+
103.70446684221288,
|
|
86
86
|
96.79922293172581,
|
|
87
87
|
90.7196977830866,
|
|
88
88
|
91.38021514948004,
|
|
@@ -91,10 +91,10 @@ const shapes = {
|
|
|
91
91
|
],
|
|
92
92
|
pointAt50: [
|
|
93
93
|
{ x: 15.938953304842967, y: 8.868891726272725 },
|
|
94
|
-
{ x:
|
|
95
|
-
{ x:
|
|
94
|
+
{ x: 14.832293673094282, y: 15.818594853651366 },
|
|
95
|
+
{ x: 1.8808184432764348, y: 5.602539862243249 },
|
|
96
96
|
{ x: 0, y: 9.424777960769376 },
|
|
97
|
-
{ x: 10.
|
|
97
|
+
{ x: 10.497072046759587, y: 8.379040530375336 },
|
|
98
98
|
{ x: 12.566370614359172, y: 0},
|
|
99
99
|
{ x: 6.406410409169571, y: 0.17024392855151 },
|
|
100
100
|
{ x: 1.8274263290642496, y: 5.4591901510102145 }
|
|
@@ -3,7 +3,7 @@ const simpleShapes = {
|
|
|
3
3
|
'M10 10l80 80V10H50', // line
|
|
4
4
|
'M10 90C30 90 25 10 50 10s20 80 40 80s15 -80 40 -80s20 80 40 80', // cubic
|
|
5
5
|
'M10 50q15 -25 30 0t30 0t30 0t30 0t30 0t30 0', // quad
|
|
6
|
-
'M6 10a6 4 10 1 0 8
|
|
6
|
+
'M6 10a6 4 10 1 0 8 0m-8 0a6 4 10 1 1 8 0m-8 0a6 4 10 0 1 8 0m-8 0a6 4 10 0 0 8 0' // arc
|
|
7
7
|
],
|
|
8
8
|
// {translate: 15, rotate: 15, scale: 0.5}
|
|
9
9
|
normalized: [
|
|
@@ -13,32 +13,32 @@ const simpleShapes = {
|
|
|
13
13
|
"M6 10A6 4 10 1 0 14 10M6 10A6 4 10 1 1 14 10M6 10A6 4 10 0 1 14 10M6 10A6 4 10 0 0 14 10"
|
|
14
14
|
],
|
|
15
15
|
transformed: [
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
16
|
+
"M18.54 6.12L46.82 55.11L57.17 16.48L37.85 11.3",
|
|
17
|
+
"M8.18 44.76C17.84 47.35 25.78 8.06 37.85 11.3S37.16 52.53 46.82 55.11S64.42 18.42 76.49 21.65S75.8 62.88 85.46 65.47",
|
|
18
|
+
"M13.36 25.44Q23.84 15.31 27.85 29.32T42.34 33.21T56.83 37.09T71.31 40.97T85.8 44.85T100.29 48.74",
|
|
19
|
+
"M16.6 5.61C14.93 6.26 15.42 8.37 17.49 9.41C19.55 10.44 21.64 9.62 21.25 7.93C21.14 7.49 20.87 7.04 20.47 6.64M16.6 5.61C15.06 4.09 15.78 2.3 17.9 2.39C20.02 2.48 21.95 4.37 21.37 5.8C21.22 6.18 20.91 6.47 20.47 6.64M16.6 5.61C17.74 5.16 19.42 5.61 20.47 6.64M16.6 5.61C17.65 6.63 19.33 7.09 20.47 6.64"
|
|
20
20
|
],
|
|
21
21
|
// {scale: [0.55,0.6,0.65]}
|
|
22
22
|
scaled3d: [
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
23
|
+
"M5.5 6L49.5 54V6H27.5",
|
|
24
|
+
"M5.5 54C16.5 54 13.75 6 27.5 6S38.5 54 49.5 54S57.75 6 71.5 6S82.5 54 93.5 54",
|
|
25
|
+
"M5.5 30Q13.75 15 22 30T38.5 30T55 30T71.5 30T88 30T104.5 30",
|
|
26
|
+
"M3.3 6C1.71 7.28 2.83 9.57 5.32 10.13C7.81 10.69 9.79 9.09 8.9 7.25C8.66 6.77 8.24 6.34 7.7 6M3.3 6C1.23 4.72 1.48 2.43 3.76 1.87C6.04 1.31 8.63 2.91 8.42 4.75C8.37 5.23 8.12 5.66 7.7 6M3.3 6C4.38 5.13 6.29 5.13 7.7 6M3.3 6C4.71 6.87 6.62 6.87 7.7 6"
|
|
27
27
|
],
|
|
28
28
|
// {skew: 45}
|
|
29
29
|
// {skew: [45,0]}
|
|
30
30
|
skewedX: [
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
31
|
+
"M20 10L180 90L100 10H60",
|
|
32
|
+
"M100 90C120 90 35 10 60 10S160 90 180 90S115 10 140 10S240 90 260 90",
|
|
33
|
+
"M60 50Q50 25 90 50T120 50T150 50T180 50T210 50T240 50",
|
|
34
|
+
"M16 10C15.24 12.13 21.11 15.95 26.56 16.88C32.01 17.81 32.96 15.15 28.26 12.09C27.03 11.29 25.55 10.56 24 10M16 10C10.1 7.87 6.74 4.05 9.96 3.12C13.17 2.19 20.54 4.85 23.22 7.91C23.93 8.71 24.2 9.44 24 10M16 10C16.52 8.56 20 8.56 24 10M16 10C20 11.44 23.48 11.44 24 10"
|
|
35
35
|
],
|
|
36
36
|
// {skew: [0,45]}
|
|
37
37
|
skewedY: [
|
|
38
|
-
"M10
|
|
39
|
-
"M10
|
|
40
|
-
"M10
|
|
41
|
-
"M6
|
|
38
|
+
"M10 20L90 180V100L50 60",
|
|
39
|
+
"M10 100C30 120 25 35 50 60S70 160 90 180S105 115 130 140S150 240 170 260",
|
|
40
|
+
"M10 60Q25 50 40 90T70 120T100 150T130 180T160 210T190 240",
|
|
41
|
+
"M6 16C3.11 15.24 5.15 21.11 9.67 26.56C14.2 32.01 17.81 32.96 16.17 28.26C15.75 27.03 14.99 25.55 14 24M6 16C2.23 10.1 2.7 6.74 6.84 9.96C10.98 13.17 15.69 20.54 15.31 23.22C15.22 23.93 14.76 24.2 14 24M6 16C7.96 16.52 11.44 20 14 24M6 16C8.56 20 12.04 23.48 14 24"
|
|
42
42
|
],
|
|
43
43
|
reversed: [
|
|
44
44
|
"M50 10H90V90L10 10",
|
|
@@ -68,7 +68,7 @@ const simpleShapes = {
|
|
|
68
68
|
{ x: 45.35533905932737, y: 45.35533905932737 },
|
|
69
69
|
{ x: 28.85808806500117, y: 46.6836898667648 },
|
|
70
70
|
{ x: 46.84696090751847, y: 58.807108530914896 },
|
|
71
|
-
{ x:
|
|
71
|
+
{ x: 7.697454886004856, y: 9.193767828563768 }
|
|
72
72
|
]
|
|
73
73
|
};
|
|
74
74
|
|
package/test/static.test.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { expect, it, describe, beforeEach, vi } from 'vitest';
|
|
2
2
|
import SVGPathCommander, { type CurveArray, type ShapeTypes } from '~/index';
|
|
3
3
|
import invalidPathValue from '../src/parser/invalidPathValue';
|
|
4
|
-
import getCubicProperties from '../src/math/cubicTools';
|
|
5
|
-
import getQuadProperties from '../src/math/quadTools';
|
|
6
|
-
import getArcProperties from '../src/math/arcTools';
|
|
7
4
|
import error from '../src/parser/error';
|
|
8
5
|
|
|
9
6
|
import getMarkup from './fixtures/getMarkup';
|
|
10
7
|
import simpleShapes from './fixtures/simpleShapes';
|
|
8
|
+
import shapes from './fixtures/shapes';
|
|
11
9
|
import shapeObjects from './fixtures/shapeObjects';
|
|
12
10
|
|
|
13
11
|
import "../docs/assets/style.css";
|
|
@@ -212,7 +210,7 @@ describe('SVGPathCommander Static Methods', () => {
|
|
|
212
210
|
const propsPoint400 = getPropertiesAtPoint(simpleShapes.initial[1], { "x": 50, "y": 10 });
|
|
213
211
|
expect(propsPoint400.closest).to.deep.equal({ x: 50.000003520199236, y: 10.000000000000531 })
|
|
214
212
|
expect(propsPoint400.distance).to.equal(0.0000035201992361067316)
|
|
215
|
-
expect(propsPoint400.segment).to.deep.equal({ segment: ['s', 20, 80, 40, 80], index: 2, length: 94.75724347727943, lengthAtSegment: 94.75724347727943})
|
|
213
|
+
expect(propsPoint400.segment).to.deep.equal({ segment: ['s', 20, 80, 40, 80], index: 2, length: 94.75724347727943, lengthAtSegment: 94.75724347727943 })
|
|
216
214
|
});
|
|
217
215
|
|
|
218
216
|
it(`Can do getSegmentAtLength`, () => {
|
|
@@ -228,7 +226,7 @@ describe('SVGPathCommander Static Methods', () => {
|
|
|
228
226
|
// first point
|
|
229
227
|
expect(getSegmentOfPoint(simpleShapes.initial[1], { x: 10, y: 90 })).to.deep.equal({ segment: ["M", 10, 90], index: 0, length: 0, point: { x: 10, y: 90 }, lengthAtSegment: 0 });
|
|
230
228
|
// mid point
|
|
231
|
-
expect(getSegmentOfPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ segment: ["a", 6, 4, 10, 0,
|
|
229
|
+
expect(getSegmentOfPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ segment: ["a", 6, 4, 10, 0, 1, 8, 0], index: 5, length: 7.498916687913066,/* point: { x: 6, y: 10 },*/ lengthAtSegment: 48.11479095890485 });
|
|
232
230
|
});
|
|
233
231
|
|
|
234
232
|
it(`Can do getClosestPoint`, () => {
|
|
@@ -236,7 +234,7 @@ describe('SVGPathCommander Static Methods', () => {
|
|
|
236
234
|
// first point
|
|
237
235
|
expect(getClosestPoint(simpleShapes.initial[1], { x: 10, y: 90 })).to.deep.equal({ x: 10, y: 90 });
|
|
238
236
|
// mid point
|
|
239
|
-
expect(getClosestPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ x: 8.
|
|
237
|
+
expect(getClosestPoint(simpleShapes.initial[3], { x: 9, y: 9 })).to.deep.equal({ x: 8.995511191469355, y: 8.952970323068374 });
|
|
240
238
|
});
|
|
241
239
|
|
|
242
240
|
it(`Can do isPointInStroke`, () => {
|
|
@@ -245,7 +243,7 @@ describe('SVGPathCommander Static Methods', () => {
|
|
|
245
243
|
expect(isPointInStroke(simpleShapes.initial[1], { x: 10, y: 90 })).to.be.true;
|
|
246
244
|
// mid point'
|
|
247
245
|
// expect(isPointInStroke(simpleShapes.initial[1], { x: 28.94438057441916, y: 46.29922469345143 })).to.be.true;
|
|
248
|
-
expect(isPointInStroke(simpleShapes.initial[1], {x: 90, y: 90})).to.be.true;
|
|
246
|
+
expect(isPointInStroke(simpleShapes.initial[1], { x: 90, y: 90 })).to.be.true;
|
|
249
247
|
// ({ x: 10, y: 10 })
|
|
250
248
|
expect(isPointInStroke(simpleShapes.initial[1], { x: 10, y: 10 })).to.be.false;
|
|
251
249
|
// ({ x: 45.355339, y: 45.355339 })
|
|
@@ -288,17 +286,39 @@ describe('SVGPathCommander Static Methods', () => {
|
|
|
288
286
|
expect(path2).to.equal(simpleShapes.normalized[0]);
|
|
289
287
|
});
|
|
290
288
|
|
|
289
|
+
it(`Can check path type`, () => {
|
|
290
|
+
const { parsePathString, isPathArray, isCurveArray, isAbsoluteArray, isRelativeArray, isNormalizedArray } = SVGPathCommander;
|
|
291
|
+
// const
|
|
292
|
+
expect(isPathArray(simpleShapes.initial[0])).to.be.false;
|
|
293
|
+
expect(isPathArray(parsePathString(simpleShapes.initial[0]))).to.be.true;
|
|
294
|
+
expect(isAbsoluteArray(simpleShapes.normalized[0])).to.be.false;
|
|
295
|
+
expect(isAbsoluteArray(parsePathString(simpleShapes.normalized[0]))).to.be.true;
|
|
296
|
+
expect(isRelativeArray(shapes.relative[7])).to.be.false;
|
|
297
|
+
// console.log(parsePathString(shapes.relative[7]))
|
|
298
|
+
expect(isRelativeArray(parsePathString(shapes.relative[7]))).to.be.true;
|
|
299
|
+
expect(isNormalizedArray(simpleShapes.normalized[0])).to.be.false;
|
|
300
|
+
expect(isNormalizedArray(parsePathString(simpleShapes.normalized[0]))).to.be.true;
|
|
301
|
+
expect(isCurveArray(simpleShapes.normalized[1])).to.be.false;
|
|
302
|
+
expect(isCurveArray(parsePathString(simpleShapes.normalized[1]))).to.be.true;
|
|
303
|
+
|
|
304
|
+
});
|
|
305
|
+
|
|
291
306
|
it(`Can cover all remaining branches`, () => {
|
|
292
|
-
const {
|
|
293
|
-
|
|
294
|
-
expect(path.length).to.be.above(0);
|
|
307
|
+
const { splitPath, parsePathString, getPathBBox, getPointAtLength, getTotalLength } = SVGPathCommander;
|
|
308
|
+
expect(getPointAtLength(simpleShapes.normalized[3], 24.057395479452424)).to.deep.equal({ x: 14, y: 10 });
|
|
295
309
|
expect(getPointAtLength(simpleShapes.normalized[0], 0)).to.deep.equal({ x: 10, y: 10 });
|
|
296
|
-
expect(
|
|
297
|
-
|
|
298
|
-
expect(
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
310
|
+
expect(getPointAtLength(simpleShapes.normalized[3], undefined)).to.deep.equal({ x: 6, y: 10 });
|
|
311
|
+
expect(getTotalLength(simpleShapes.normalized[0])).to.be.above(233);
|
|
312
|
+
expect(getPathBBox(simpleShapes.normalized[2])).to.deep.equal({
|
|
313
|
+
"cx": 100, "cy": 50, "cz": 192.5,
|
|
314
|
+
"height": 25, "width": 180,
|
|
315
|
+
"x": 10, "y": 37.5, "x2": 190, "y2": 62.5,
|
|
316
|
+
});
|
|
317
|
+
expect(getPathBBox(simpleShapes.normalized[1])).to.deep.equal({
|
|
318
|
+
"cx": 90, "cy": 50, "cz": 200,
|
|
319
|
+
"height": 80, "width": 160,
|
|
320
|
+
"x": 10, "y": 10, "x2": 170,"y2": 90,
|
|
321
|
+
});
|
|
322
|
+
expect(splitPath(parsePathString(shapes.relative[1])).length).to.equal(7);
|
|
303
323
|
});
|
|
304
324
|
});
|
package/cypress.config.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "cypress";
|
|
2
|
-
import createBundler from "@bahmutov/cypress-esbuild-preprocessor";
|
|
3
|
-
import createEsbuildIstanbulPlugin from "./cypress/plugins/esbuild-istanbul";
|
|
4
|
-
|
|
5
|
-
async function setupNodeEvents(
|
|
6
|
-
on: Cypress.PluginEvents,
|
|
7
|
-
config: Cypress.PluginConfigOptions
|
|
8
|
-
): Promise<Cypress.PluginConfigOptions> {
|
|
9
|
-
await require("@cypress/code-coverage/task")(on, config);
|
|
10
|
-
|
|
11
|
-
on(
|
|
12
|
-
"file:preprocessor",
|
|
13
|
-
createBundler({
|
|
14
|
-
plugins: [createEsbuildIstanbulPlugin()],
|
|
15
|
-
})
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
// Make sure to return the config object as it might have been modified by the plugin.
|
|
19
|
-
return config;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default defineConfig({
|
|
23
|
-
e2e: {
|
|
24
|
-
specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
|
|
25
|
-
supportFile: "cypress/support/e2e.ts",
|
|
26
|
-
video: false,
|
|
27
|
-
setupNodeEvents,
|
|
28
|
-
},
|
|
29
|
-
});
|
package/src/process/fixArc.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { CSegment, PathArray, PathCommand } from '../types';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Splits an extended A (arc-to) segment into two cubic-bezier segments.
|
|
5
|
-
*
|
|
6
|
-
* @param path the `pathArray` this segment belongs to
|
|
7
|
-
* @param allPathCommands all previous path commands
|
|
8
|
-
* @param i the segment index
|
|
9
|
-
*/
|
|
10
|
-
const fixArc = (path: PathArray, allPathCommands: PathCommand[], i: number) => {
|
|
11
|
-
if (path[i].length > 7) {
|
|
12
|
-
path[i].shift();
|
|
13
|
-
const segment = path[i];
|
|
14
|
-
let ni = i; // ESLint
|
|
15
|
-
while (segment.length) {
|
|
16
|
-
// if created multiple C:s, their original seg is saved
|
|
17
|
-
allPathCommands[i] = 'A';
|
|
18
|
-
path.splice((ni += 1), 0, ['C', ...segment.splice(0, 6)] as CSegment);
|
|
19
|
-
}
|
|
20
|
-
path.splice(i, 1);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export default fixArc;
|