forked from thednp/svg-path-commander
-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert.html
137 lines (122 loc) · 24.1 KB
/
convert.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
<!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 Convert Shape To Path</title>
<meta name="description" content="SVGPathCommander convert shape to path demo">
<meta name="keywords" content="javascript,svg,svg path,svgpathcommander,convert shape,svg circle,svg ellipse,svg glyph,svg polyline,svg polygon">
<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.2c4.3 11.4 8.6 22.8 13 34.3c0.5 1.4 1.1 2.9 1.6 4.3c0.1 0.2 0.2 0.4 0.2 0.6c0.5 1.4 1 2.7 1.6 4.1c0.3 0.8 1 1.9 1 2.7H128c0 -0.5 0.7 -1.7 0.9 -2.2c0.6 -1.4 1.1 -2.7 1.6 -4.1c0.1 -0.2 0.2 -0.5 0.3 -0.7c0.4 -1.1 0.9 -2.3 1.3 -3.4c1.8 -4.8 3.6 -9.6 5.5 -14.4c4.6 -12 9.1 -23.9 13.7 -35.9c1.1 -2.8 2.2 -5.7 3.2 -8.5h2.6l-27.1 70z"/>
<path id="path-commander_" d="M628.2 158.3h-16.1l0 -53.1h15.2l0 6.8c3 -4.9 9.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0c-1 0 -2.5 -0.3 -3.5 0c-0.6 0.2 -0.4 0.1 -0.4 0.9c0 1.2 0 2.5 0 3.7c0 1 0.2 2.2 0 3.3c-0.1 0.6 0 0.5 -0.8 0.5c-1.3 0 -2.5 0 -3.8 0c-0.3 0 -1.9 -0.2 -2.2 0c-0.3 0.3 0 2.6 0 3.1c0 1 0 2.1 0 3.1c2.3 0 4.5 0 6.8 0c0 4.3 0 8.7 0 13c0 3 0 6 0 9c0 1 0 2 0 3c0 0.2 -0.1 1.1 0 1.3c0.2 0.3 2.4 0 2.8 0c0.7 0 1.5 0 2.2 0c0.2 0 1.2 0.1 1.4 0c0.1 -0.1 0 -0.8 0 -0.9c0 -0.9 0 -1.9 0 -2.8c0 -6 0 -11.9 0 -17.9c0 -1.2 0 -2.4 0 -3.5c0 -0.2 -0.1 -1.1 0 -1.2c0.2 -0.1 1.1 0 1.3 0c0.9 0 1.7 0 2.6 0c1.2 0 2.4 0 3.6 0c0 -0.9 0 -1.7 0 -2.6c0 -0.7 0 -1.4 0 -2.1c0 -0.3 0.1 -1.1 0 -1.3c-0.2 -0.4 -0.7 -0.2 -1.3 -0.2c-1.3 0 -2.6 0 -3.9 0c-0.3 0 -2.1 0.2 -2.3 0c-0.2 -0.2 0 -1.8 0 -2.1c0 -2.2 0 -4.2 0 -6.3z"/>
</svg>
<small class="d-none d-md-block"></small>
</a></h1>
<div class="row m-0 copy">
<div class="col p-0" style="min-width: 57%;">
<p class="nav">
<a href="./index.html">Process</a> |
<a class="active" 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 Input</b></p>
<div contenteditable="true" class="form-input" id="t1" placeholder="Paste your SVG here" spellcheck="false"><svg viewBox="0 0 182 72">
<circle id="circle" cx="27.5" cy="36.9" r="23.5" fill="orangered"/>
<ellipse id="ellipse" cx="68.3" cy="37" rx="15.1" ry="23.4" fill="darkorange"/>
<polygon id="polygon" points="107.4,13 113.7,28.8 127.9,31.3 117.6,43.5 120.1,60.8 107.4,52.6 94.6,60.8 97.1,43.5 86.8,31.3 101,28.8" fill="yellow"/>
<rect id="rect" x="131" y="13.2" width="47.5" height="47.6" rx="5" fill="yellowgreen"/>
</svg>
</div>
<p>
<button type="button" data-bs-toggle="tooltip" title="Convert To Path(s)" onclick="convert()">Convert</button>
</p>
</div>
<div class="d-none d-md-block">
<p><b>SVG Output</b></p>
<div contenteditable="true" class="form-input" id="t2" spellcheck="false"></div>
</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" viewBox="0 0 0 0">
</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="./dist/svg-path-commander.min.js"></script> -->
<script src="./dist/svg-path-commander.js"></script>
<script>
const getPathBBox = SVGPathCommander.getPathBBox,
shapeToPath = SVGPathCommander.shapeToPath,
svg = document.getElementById('test-svg'),
inputTextArea = document.getElementById('t1'),
outputTextArea = document.getElementById('t2');
function convert() {
let desc = '';
const br = document.createElement('text');
const { innerText } = inputTextArea;
const hasSVG = innerText.includes('<svg');
const value = hasSVG ? innerText.trim() : `<svg>\n${innerText.trim()}</svg>`;
const domParser = new DOMParser();
let tempDocument = domParser.parseFromString(value, 'text/html');
const SVG = tempDocument.querySelector('svg');
Array.from(svg.querySelectorAll('path')).forEach((shape) => shape.remove());
const shapes = Array.from(SVG.querySelectorAll('circle,ellipse,rect,polygon,polyline,glyph'));
shapes.forEach((shape) => shapeToPath(shape, true));
Array.from(SVG.children).forEach((shape) => (desc += shape.getAttribute('d')));
if (!hasSVG) {
const bbox = getPathBBox(desc);
const {width, height, x, y} = bbox;
SVG.setAttribute('viewBox', (`0 0 ${width + x} ${height + y}`));
} else {
svg.setAttribute('viewBox', SVG.getAttribute('viewBox'));
}
Array.from(SVG.children).forEach((shape) => svg.append(document.importNode(shape)));
outputTextArea.innerText = SVG.outerHTML
.replace(/\n/gm, '')
.replace(/\s*<path/gm, '<path')
.replace(/><\/path>/gm, ' />')
.replace(/<path/gm, '\n <path')
.replace(/<\/svg>/, '\n<\/svg>');
SVG.remove();
}
convert()
</script>
</body>
</html>