Lines Matching full:path

24 <h2> Can output to an SVG Path, a Canvas, or a Path2D object </h2>
33 <h2> Has various Path Effects </h2>
86 let newSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path');
128 let path = objs[i];
130 path.moveTo(20, 5);
131 path.lineTo(30, 20);
132 path.lineTo(40, 10);
133 path.lineTo(50, 20);
134 path.lineTo(60, 0);
135 path.lineTo(20, 5);
137 path.moveTo(20, 80);
138 path.bezierCurveTo(90, 10, 160, 150, 190, 10);
140 path.moveTo(36, 148);
141 path.quadraticCurveTo(66, 188, 120, 136);
142 path.lineTo(36, 148);
144 path.rect(5, 170, 20, 20);
146 path.moveTo(150, 180);
147 path.arcTo(150, 100, 50, 200, 20);
148 path.lineTo(160, 160);
150 path.moveTo(20, 120);
151 path.arc(20, 120, 18, 0, 1.75 * Math.PI);
152 path.lineTo(20, 120);
157 path.addPath(secondPath);
164 path.addPath(secondPath, m);
167 // path.addPath(secondPath, 1, 0, 0, 1, 0, 20.5);
173 if (path.toPath2D) {
174 canvasCtx.stroke(path.toPath2D());
176 canvasCtx.stroke(path);
185 function drawStar(path) {
187 path.moveTo(C + R + 22, C);
190 path.lineTo(C + R * Math.cos(a) + 22, C + R * Math.sin(a));
192 path.closePath();
193 return path;
199 (path) => path,
201 (path, counter) => path.dash(10, 3, counter/5),
204 (path, counter) => path.trim((counter/100) % 1, 0.8, false),
206 (path) => path.simplify(),
208 (path, counter) => path.stroke({
215 (path, counter) => {
216 let orig = path.copy();
217 path.stroke({
225 (path, counter) => {
226 let simplified = path.simplify().copy();
227 path.stroke({
243 let path = PathKit.NewPath();
244 drawStar(path);
246 // The transforms apply directly to the path.
247 effects[i](path, counter);
254 ctx.fill(path.toPath2D(), path.getFillTypeString());
256 ctx.stroke(path.toPath2D());
264 path.delete();
277 let path = drawStar(PathKit.NewPath());
293 path.transform(scaleDown);
295 path.transform(scaleUp);
299 ctx.stroke(path.toPath2D());
320 let diffSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path');
328 let unionSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path');
331 // ask what the path thinks fill-rule should be ('evenodd')