Lines Matching full:path
1 describe('PathKit\'s Path Behavior', function() {
3 describe('Basic Path Features', function() {
5 let path = PathKit.NewPath();
6 path.moveTo(0, 0);
7 path.lineTo(10, 0);
8 path.lineTo(10, 10);
9 path.close();
10 return path;
15 let path = drawSimplePath();
19 expect(path.equals(path)).toBe(true);
20 expect(otherPath.equals(path)).toBe(true);
21 expect(path.equals(otherPath)).toBe(true);
23 expect(path.equals(blank)).toBe(false);
25 expect(blank.equals(path)).toBe(false);
28 path.delete();
99 let path = PathKit.NewPath();
100 expect(path.getBounds()).toEqual(PathKit.LTRBRect(0, 0, 0, 0));
101 path.moveTo(-5, -8);
102 expect(path.getBounds()).toEqual(PathKit.LTRBRect(-5, -8, -5, -8));
103 path.rect(1, 2, 2, 2);
104 expect(path.getBounds()).toEqual(PathKit.LTRBRect(-5, -8, 3, 4));
105 path.moveTo(1, 2);
106 expect(path.getBounds()).toEqual(PathKit.LTRBRect(-5, -8, 3, 4));
107 path.delete();
115 let path = PathKit.NewPath();
116 path.moveTo(1, 1);
117 path.quadraticCurveTo(4, 3, 2, 2);
118 expect(path.getBounds()).toEqual(PathKit.LTRBRect(1, 1, 4, 3));
119 ExpectRectsToBeEqual(path.computeTightBounds(),
123 path.delete();
148 let path = PathKit.NewPath();
149 path.moveTo(20, 120);
150 path.arc(20, 120, 18, 0, 1.75 * Math.PI);
151 path.lineTo(20, 120);
162 ExpectCmdsToBeEqual(path.toCmds(), expectedCmds);
164 path.delete();