Lines Matching full:path
5 let path = PathKit.NewPath();
7 path.moveTo(20, 5);
8 path.lineTo(30, 20);
9 path.lineTo(40, 10);
10 path.lineTo(50, 20);
11 path.lineTo(60, 0);
12 path.lineTo(20, 5);
14 path.moveTo(20, 80);
15 path.bezierCurveTo(90, 10, 160, 150, 190, 10);
17 path.moveTo(36, 148);
18 path.quadraticCurveTo(66, 188, 120, 136);
19 path.lineTo(36, 148);
21 path.rect(5, 170, 20, 20);
23 path.moveTo(150, 180);
24 path.arcTo(150, 100, 50, 200, 20);
25 path.lineTo(160, 160);
27 path.moveTo(20, 120);
28 path.arc(20, 120, 18, 0, 1.75 * Math.PI);
29 path.lineTo(20, 120);
34 path.addPath(secondPath);
41 path.addPath(secondPath, m);
49 canvasCtx.stroke(path.toPath2D());
51 let svgPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
55 svgPath.setAttribute('d', path.toSVGString());
63 path.delete();
76 let path = PathKit.NewPath();
78 let p1 = path.moveTo(20, 5)
84 expect(path === p1).toBe(true);
88 // the underlying path was already deleted.
89 path.delete();
98 it('does not leak path objects when chaining', function(done) {
104 // Testing showed around 50k is enough to see one if we leak a path,
107 let path = PathKit.NewPath()
112 path.delete();
119 let path = PathKit.NewPath();
120 path.moveTo(0, 0);
121 path.lineTo(10, 0);
122 path.lineTo(10, 10);
123 path.close();
124 return path;
131 // These add path call can be chained.
150 let path = PathKit.NewPath();
151 path.moveTo(50, 120);
152 path.arc(50, 120, 45, 0, 1.75 * Math.PI);
153 path.lineTo(50, 120);
163 path.toCanvas(canvasCtx);
165 // No need to check the whole path, as that's more what the
169 path.delete();