forked from thednp/svg-path-commander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
334 lines (291 loc) · 39.5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1.0">
<title>SVGPathCommander Path Tools</title>
<meta name="description" content="SVGPathCommander Path Tools">
<meta name="keywords" content="javascript,svg,svg path,svgpathcommander,path to absolute,path to relative, normalize path">
<meta name="author" content="thednp">
<link href="./assets/style.css" rel="stylesheet">
<link rel="shortcut icon" href="./assets/favicon.ico">
<link rel="apple-touch-icon" href="./assets/apple-touch-icon.png">
<script src="https://cdn.jsdelivr.net/npm/bootstrap.native/dist/bootstrap-native.min.js"></script>
</head>
<body>
<h1><a href="https://github.com/thednp/svg-path-commander">
<svg id="svg-path-commander" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1135 256" aria-label="SVGPathCommander - modern path processing tool" fill="currentColor">
<path id="svg_" fill="orangered" d="M222.7 102.2l-1.7 1.6c-7.6 -10 -20.4 -14.3 -32.6 -11.6c-12 2.6 -20.9 12.5 -23.7 24.2c-2.9 12.1 -0.1 25.8 9.3 34.4c9.2 8.4 23.5 10.5 34.9 5.9c6.2 -2.5 11.2 -7.3 14 -13.4c2.4 -5.5 2.9 -11.2 2.9 -17.1l0.6 0.5h-29.6l0 -2.2h31.3c0 11.9 -2.5 24.5 -13.1 31.5c-10.8 7.2 -27 6.8 -37.9 0c-11.3 -7.1 -16.2 -20.4 -15.5 -33.3c0.8 -13.3 8 -25.6 20.5 -30.9c7 -3 15 -3.5 22.4 -1.7c7.5 1.7 13.5 6.3 18.2 12.1zM46.1 148.7l1.8 -1.6c6.3 9.8 19.2 13.8 30.3 11.2C83.6 157 89 153.5 91.1 148.1c2.2 -5.5 0.5 -11.3 -4.1 -14.8c-4.5 -3.4 -10.3 -5 -15.6 -6.5c-5.8 -1.7 -11.6 -3.3 -16.6 -6.7c-4.9 -3.4 -7.2 -8.7 -6.5 -14.6C49 99.9 52.8 95.1 57.7 92.4C63.5 89.2 70.5 88.6 77 89.5c6.5 1 12 4.3 16 9.5l-1.7 1.5C87.7 96 83.3 93 77.6 91.9C72 90.8 65.9 91 60.8 93.3c-5 2.2 -9.3 6.4 -10.1 11.9c-0.9 6 1.9 11 6.9 14.1c5.2 3.3 11.4 4.3 17.2 6c5.5 1.6 11.8 3.8 15.8 8c4 4.2 4.8 10.3 2.6 15.7c-2.1 5 -6.6 8.6 -11.6 10.4c-12.3 4.6 -28 0.1 -35.5 -10.7zM130 160.2h-2.7l-26.8 -70h2.6c2.9 7.7 5.8 15.5 8.8 23.2c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-20.1 -13 -20.5 -25.1c-0.2 -6.1 1.2 -12 4.6 -17c3.1 -4.5 7.5 -8 12.6 -10c10.9 -4.3 24.5 -2.1 32.8 6.4s10.1 22.6 4 32.9c-6.7 11.5 -20.9 16.1 -33.5 12.8zM395.8 158.3h-16c0 -8.6 0 -17.2 0 -25.8c0 -9.1 0 -18.2 0 -27.4c0 -4.5 0 -8.9 0 -13.4h16l0 66.6zM380.1 119.2h-9.7l0 -14h9.7l0 14zM958.2 146.1c6.1 0 10.4 -4.5 11.5 -10.2c1 -5.1 0.4 -11.3 -3.4 -15.1c-3.9 -3.9 -10.4 -4.5 -14.9 -1.3s-5.6 9.4 -5.1 14.6c0.6 6.4 5 12 11.9 12zM573.1 145.5c12.4 0 16.3 -17.3 7.9 -24.9c-4.1 -3.7 -10.5 -3.9 -15 -0.7c-4.5 3.3 -5.8 9.2 -5.1 14.4c0.8 6.3 5.8 11.2 12.2 11.2zM333.5 145.7c5.9 0 10.2 -3.8 11.6 -9.4c1.3 -5.3 0.5 -11.8 -3.5 -15.7c-3.9 -3.8 -10.7 -4 -15 -0.8c-4.4 3.3 -5.5 9.3 -4.9 14.4c0.7 6.4 5.2 11.5 11.8 11.5zM828.6 145.7c5.9 0 10.2 -3.8 11.6 -9.4c1.3 -5.3 0.5 -11.8 -3.5 -15.7c-3.9 -3.8 -10.7 -4 -15 -0.8c-4.4 3.3 -5.5 9.3 -4.9 14.4c0.7 6.4 5.2 11.5 11.8 11.5zM262.7 103.3V120c2.3 0 4.6 0 6.9 0c2.8 0 5.8 0.4 8.4 -1.2c4.4 -2.7 5.2 -9.7 1.5 -13.3c-2.5 -2.4 -5.6 -2.2 -8.8 -2.2c-0.6 0 -8 0 -8 0zM395.8 105.2h11.7l0 14h-11.7l0 -14z"/>
<path id="subtext_" fill-opacity="0.6" d="M253.2 190.3c0 -5 5.2 -8.8 10 -7.5c3.9 1 4.6 4.9 4.6 8.3c0 5.1 0 10.2 0 15.3c0 0.9 0 1.9 0 2.8c0 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0 -2.2 0 -4.2 0 -6.3z"/>
</svg>
</a></h1>
<div class="row m-0 copy">
<div class="col p-0" style="min-width: 57%;">
<p class="nav">
<a class="active" href="./index.html">Process</a> |
<a href="./convert.html">Convert</a>
</p>
</div>
<div class="col p-0">
<p class="text-right">
<a href="https://github.com/thednp/svg-path-commander">Github</a> |
<a href="https://www.npmjs.com/package/svg-path-commander">npm</a> |
<a href="https://www.jsdelivr.com/package/npm/svg-path-commander">cdn</a>
</p>
</div>
</div>
<hr>
<div class="row row-lg">
<div class="col col-lg">
<div class="d-none d-md-block">
<p><b>SVG viewBox</b></p>
<input type="text" class="form-input" id="i1" placeholder="Type in viewBox value" value="0 0 16 16" />
<p><b>PathValue Input</b></p>
<textarea class="form-input" id="t1" placeholder="Type in d value"></textarea>
<p><b>Instance Methods</b></p>
<p>
<button type="button" data-bs-toggle="tooltip" title="Initialize and update pathString" onclick="parse()">Init</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, convert to absolute and update pathString" onclick="toAbs()">toAbsolute</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, convert to relative and update pathString" onclick="toRel()">toRelative</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, normalize and update pathString" onclick="toNormal()">Normalize</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, optimize, remove decimals, and update pathString" onclick="toOptimal()">Optimize</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, reverse, optimize and update pathString" onclick="toRev()">Reverse</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, reverse subpath, optimize and update pathString" onclick="toRev(1)">Reverse Subpath</button>
</p>
<p><b>KUTE.js Tools</b></p>
<p>
<button type="button" data-bs-toggle="tooltip" title="Initialize, convert path commands to cubic bezier, and update pathString. The resulted pathString has intentionally no rounded numbers. The utility is used by KUTE.js" onclick="toCurve()">toCurve</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, convert path commands to cubic bezier, reverse and update pathString. The utility is used by KUTE.js" onclick="toRevCurve()">Reverse Curve</button>
<button type="button" data-bs-toggle="tooltip" title="Initialize, convert path commands to cubic bezier, reverse only subpath and update pathString" onclick="toRevCurve(1)">Reverse Subpath Curve</button>
<button type="button" data-bs-toggle="tooltip" title="Convert to absolute, convert to string, split pathString, optimize each subpath then update the overall pathString. Also useful for KUTE.js" onclick="toSplit()">Split</button>
</p>
</div>
<p><b>Matrix Transformation</b></p>
<p>
<button type="button" data-bs-toggle="tooltip" title="Rotate 180deg on X axis, the default transform origin is shape's center, Font-Icon creators love it" onclick="flipX()">FlipX</button>
<button type="button" data-bs-toggle="tooltip" title="Rotate 180deg on Y axis, the default transform origin is shape's center, and using {round:5} option" onclick="flipY()">FlipY</button>
<button type="button" data-bs-toggle="tooltip" title="Rotate 180deg on both X and Y axes, the default transform origin is shape's center" onclick="flipXY()">FlipXY</button>
<button type="button" data-bs-toggle="tooltip" title="Transform multiple functions in object { translate: 1, skew: 15, rotate:-45, scale: 0.5 }. Transform origin is auto" onclick="transform({ translate: 1, skew: 15, rotate:-45, scale: 0.5 })">Quick transform</button>
</p>
<p>
<!-- <input class="form-input d-inline" data-bs-toggle="tooltip" data-title="Perspective" type="number" name="perspective" id="perspective" placeholder="Perspective" value="400" min="200" max="2000" step="100"> -->
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="TranslateX" type="number" name="translateX" id="translateX" placeholder="TranslateX" value="0" min="-16" max="16" step="1">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="TranslateY" type="number" name="translateY" id="translateY" placeholder="TranslateY" value="0" min="-16" max="16" step="1">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="TranslateZ" type="number" name="translateZ" id="translateZ" placeholder="TranslateZ" value="0" min="-16" max="16" step="1">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="RotateX" type="number" name="rotateX" id="rotateX" placeholder="RotateX" value="0" min="-360" max="360" step="5">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="RotateY" type="number" name="rotateY" id="rotateY" placeholder="RotateY" value="0" min="-360" max="360" step="5">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="RotateZ" type="number" name="rotateZ" id="rotateZ" placeholder="RotateZ" value="0" min="-360" max="360" step="5">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="SkewX" type="number" name="skewX" id="skewX" placeholder="SkewX" value="0" min="-360" max="360" step="5">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="SkewY" type="number" name="skewY" id="skewY" placeholder="SkewY" value="0" min="-360" max="360" step="5">
<input class="form-input d-inline" data-bs-toggle="tooltip" data-title="Scale" type="number" name="scale" id="scale" placeholder="Scale" value="1" min="0" max="10" step="0.1">
<button
type="button" data-bs-toggle="tooltip" title="Transform multiple functions in the form"
onclick="transform({translate: [translateX.value||0,translateY.value||0,translateZ.value||0], rotate:[rotateX.value||0,rotateY.value||0,rotateZ.value||0], skew:[skewX.value||0,skewY.value||0], scale:[scale.value||1,scale.value||1,scale.value||1]})">
Transform
</button>
</p>
<div class="d-none d-md-block">
<p><b>PathValue Output</b></p>
<textarea class="form-input" id="t2"></textarea>
</div>
</div>
<div class="col col-lg">
<p class="d-none d-md-block"><b>Test</b></p>
<div class="text-center">
<svg id="test-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<path d="M0 0L0 0" fill="rgba(125,125,125,0.3)"></path>
</svg>
</div>
</div>
</div>
<hr style="margin-top:1.5rem">
<div class="row m-0 copy">
<div class="col p-0" style="min-width: 57%;">
<p>
<a href="https://github.com/thednp/svg-path-commander">Github</a> |
<a href="https://www.npmjs.com/package/svg-path-commander">npm</a> |
<a href="https://www.jsdelivr.com/package/npm/svg-path-commander">cdn</a>
</p>
</div>
<div class="col p-0">
<p class="text-right">2021 © <a href="https://github.com/thednp">thednp</a></p>
</div>
</div>
<script src="./experiments/raphael.js"></script>
<script src="./dist/svg-path-commander.js"></script>
<script>
SVGPathCommander.options.round = 3;
var pathToCurve = SVGPathCommander.pathToCurve,
pathToString = SVGPathCommander.pathToString,
roundPath = SVGPathCommander.roundPath,
splitPath = SVGPathCommander.splitPath,
getPathLength = SVGPathCommander.getPathLength,
reverseCurve = SVGPathCommander.reverseCurve,
optimizePath = SVGPathCommander.optimizePath,
svg = document.getElementById('test-svg'),
path = svg.children[0],
inputTextArea = document.getElementById('t1'),
outputTextArea = document.getElementById('t2'),
vertSpacing = parseFloat(getComputedStyle(outputTextArea).paddingTop) * 2,
pathValue = '',
shapes = [
'M16 8C16 4.134 12.418 1 8 1S0 4.134 0 8c0 1.759 0.744 3.369 1.969 4.6c-0.096 1.016 -0.416 2.13 -0.77 2.966c-0.078 0.185 0.072 0.394 0.272 0.362c2.256 -0.37 3.597 -0.938 4.18 -1.234A9.06 9.06 0 0 0 8 15c4.417 0 8 -3.134 8 -7zM7.194 6.766c0.087 0.123 0.163 0.259 0.227 0.4c0.427 0.948 0.392 2.377 -0.942 3.705a0.446 0.446 0 0 1 -0.612 0.009A0.405 0.405 0 0 1 5.856 10.293C6.274 9.876 6.528 9.462 6.665 9.072C6.396 9.237 6.077 9.332 5.735 9.332C4.775 9.333 4 8.587 4 7.667C4 6.747 4.776 6 5.734 6C6.005 6 6.262 6.06 6.49 6.166L6.498 6.17c0.168 0.07 0.326 0.182 0.468 0.323c0.084 0.083 0.161 0.174 0.227 0.272zM11 9.073C10.731 9.238 10.412 9.333 10.07 9.333C9.112 9.333 8.335 8.587 8.335 7.667C8.335 6.747 9.112 6 10.069 6c0.27 0 0.527 0.059 0.755 0.166l0.008 0.003c0.169 0.07 0.326 0.182 0.468 0.323c0.085 0.083 0.16 0.174 0.227 0.272c0.086 0.123 0.163 0.259 0.227 0.4c0.428 0.948 0.391 2.377 -0.942 3.705a0.446 0.446 0 0 1 -0.612 0.009a0.405 0.405 0 0 1 -0.01 -0.589c0.419 -0.416 0.671 -0.83 0.809 -1.221z',
'M16 14v-9h-16v9a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2zM2.56 12.332h-0.71l1.898 -5.332h0.696l1.898 5.332h-0.718l-0.54 -1.602h-1.984l-0.54 1.602zM4.104 7.805h-0.02l-0.8 2.375h1.616l-0.796 -2.375zM9.85 8.227v4.105h-0.668v-0.539h-0.027c-0.145 0.325 -0.532 0.605 -1.188 0.605c-0.847 0 -1.453 -0.484 -1.453 -1.425v-2.746h0.676v2.554c0 0.766 0.441 1.012 0.98 1.012c0.59 0 1.004 -0.371 1.004 -1.023v-2.543h0.676zM11.123 12.637c0.075 0.332 0.422 0.636 0.985 0.636c0.648 0 1.07 -0.378 1.07 -1.023v-0.605h-0.02c-0.163 0.355 -0.613 0.648 -1.171 0.648c-0.957 0 -1.64 -0.672 -1.64 -1.902v-0.34c0 -1.207 0.675 -1.887 1.64 -1.887c0.558 0 1.004 0.293 1.195 0.64h0.02v-0.577h0.648v4.03c0 1.052 -0.816 1.579 -1.746 1.579c-1.043 0 -1.574 -0.516 -1.668 -1.2h0.687zM13.178 10.102c0 -0.832 -0.414 -1.36 -1.062 -1.36c-0.692 0 -1.098 0.492 -1.098 1.36v0.253c0 0.852 0.406 1.364 1.098 1.364c0.671 0 1.062 -0.516 1.062 -1.364v-0.253zM4 0.5a0.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',
'M5.5.5A.5.5 0 016 0h4a.5.5 0 010 1H9v1.07a7.002 7.002 0 013.537 12.26l.817.816a.5.5 0 01-.708.708l-.924-.925A6.967 6.967 0 018 16a6.967 6.967 0 01-3.722-1.07l-.924.924a.5.5 0 01-.708-.708l.817-.816A7.002 7.002 0 017 2.07V1H5.999a.5.5 0 01-.5-.5zM.86 5.387A2.5 2.5 0 114.387 1.86 8.035 8.035 0 00.86 5.387zM13.5 1c-.753 0-1.429.333-1.887.86a8.035 8.035 0 013.527 3.527A2.5 2.5 0 0013.5 1zm-5 4a.5.5 0 00-1 0v3.882l-1.447 2.894a.5.5 0 10.894.448l1.5-3A.5.5 0 008.5 9V5z',
'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.354 4.646A0.5 0.5 0 1 0 4.646 5.354L7.293 8l-2.647 2.646a0.5 0.5 0 0 0 0.708 0.708L8 8.707l2.646 2.647a0.5 0.5 0 0 0 0.708 -0.708L8.707 8l2.647 -2.646A0.5 0.5 0 0 0 10.646 4.646L8 7.293L5.354 4.646z',
'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.172a2 2 0 0 1 -1.414 -0.586l-0.828 -0.828a2 2 0 0 0 -1.414 -0.586h-2.344a2 2 0 0 0 -1.414 0.586l-0.828 0.828a2 2 0 0 1 -1.414 0.586h-1.172zM10.5 8.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 1zM11.5 8.5a3.5 3.5 0 1 1 -7 0a3.5 3.5 0 0 1 7 0z',
'M2 0a2 2 0 00-2 2v12a2 2 0 002 2h12a2 2 0 002-2V2a2 2 0 00-2-2H2zm7.5 11h-4a.5.5 0 01-.5-.5v-4a.5.5 0 011 0v2.793l4.146-4.147a.5.5 0 01.708.708L6.707 10H9.5a.5.5 0 010 1z',
'M15.984 8.5A8 8 0 0 1 2.707 14l5.5 -5.5h7.778zM2 13.293l5.5 -5.5V0.015A8 8 0 0 0 2 13.292zM8.5 0.015A8.001 8.001 0 0 1 15.985 7.5H8.5V0.015z'
];
pathValue = shapes[Math.random()*(shapes.length)>>0]
inputTextArea.value = pathValue
// pathValue = inputTextArea.innerText
inputTextArea.style.height = (inputTextArea.scrollHeight - vertSpacing) + 'px'
path.setAttribute('d', pathValue);
function randomColor(){
// green blue red orange indigo pink yellow
let colors = ['#4CAF50', '#2196F3', '#e91b1f', '#FF5722', '#9C27B0', '#ff1493', '#ffd626'],
rn = Math.random() * 7 >> 0;
return colors[rn]
}
function parse() { // Init
pathValue = inputTextArea.value || pathValue
var pv = new SVGPathCommander( pathValue );
path.setAttribute('d', pv.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = pv.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function toNormal() { // normalize
pathValue = inputTextArea.value || pathValue
var nm = new SVGPathCommander( pathValue ).normalize();
path.setAttribute('d', nm.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = nm.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function toOptimal() { // optimize
pathValue = inputTextArea.value || pathValue
var opt = new SVGPathCommander( pathValue, {round: 'auto'} ).optimize();
path.setAttribute('d', opt.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = opt.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
// inputTextArea.value = shapes[2];
function toAbs() { // To absolute coordinates
pathValue = inputTextArea.value || pathValue
var absPath = new SVGPathCommander( pathValue ).toAbsolute();
path.setAttribute('d', absPath.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = absPath.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function toRel() { // To relative coordinates
pathValue = inputTextArea.value || pathValue
var relPath = new SVGPathCommander( pathValue ).toRelative();
path.setAttribute('d', relPath.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = relPath.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
let usedCurve = false;
function toCurve() { // To curve coordinates
pathValue = inputTextArea.value || pathValue
var cv = new SVGPathCommander(pathValue, {round: false}).toCurve();
path.setAttribute('d', cv.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = '';
outputTextArea.value = cv.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px';
if (!usedCurve)
console.warn(`The "toCurve()" instance example doesn\'t round the path values as configured with 'round: false' option.`);
usedCurve = true;
}
function toRevCurve(onlySubpath) { // To curve coordinates
pathValue = inputTextArea.value || pathValue
var cv = new SVGPathCommander(pathValue, {round: 'auto'}).toCurve().reverse(onlySubpath);
path.setAttribute('d', cv.toString());
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = cv.toString();
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function toRev(onlySubpath) { // reverse coordinates
pathValue = inputTextArea.value || pathValue
var revPath = new SVGPathCommander( pathValue ).reverse(onlySubpath).toString();
path.setAttribute('d', revPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = revPath;
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function toSplit() { // split coordinates
pathValue = inputTextArea.value || pathValue
var absPath = new SVGPathCommander( pathValue ).toAbsolute().toString();
path.setAttribute('d', absPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = splitPath(absPath).map(x=>new SVGPathCommander( x ).toRelative().toString()).join('\r\n\r\n');
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function flipX() { // transform
pathValue = inputTextArea.value || pathValue
var tfPath = new SVGPathCommander( pathValue ).flipX().optimize().toString();
path.setAttribute('d', tfPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = tfPath;
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function flipY() { // transform
pathValue = inputTextArea.value || pathValue
var tfPath = new SVGPathCommander( pathValue, {round:5} ).flipY().optimize().toString();
path.setAttribute('d', tfPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = tfPath;
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function flipXY() { // transform
pathValue = inputTextArea.value || pathValue
var tfPath = new SVGPathCommander( pathValue ).flipY().flipX().optimize().toString();
path.setAttribute('d', tfPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = tfPath;
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
function transform(transformObject) { // transform
pathValue = inputTextArea.value || pathValue
transformObject = transformObject || { translate: 1, skew: 15, rotate:-45, scale: 0.5 }
var tfPath = new SVGPathCommander( pathValue ).transform(transformObject).optimize().toString();
path.setAttribute('d', tfPath);
path.setAttribute('fill', randomColor());
svg.setAttribute('viewBox',document.getElementById('i1').value||'0 0 16 16');
outputTextArea.style.height = ''
outputTextArea.value = tfPath;
outputTextArea.style.height = (outputTextArea.scrollHeight - vertSpacing) + 'px'
}
</script>
</body>
</html>