• Home
  • Raw
  • Download

Lines Matching refs:CanvasKit

18         const paint = new CanvasKit.Paint();
21 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
22 paint.setStyle(CanvasKit.PaintStyle.Stroke);
24 const path = new CanvasKit.Path();
52 const rrect = CanvasKit.RRectXY([100, 10, 140, 62], 10, 4);
54 const rrectPath = new CanvasKit.Path().addRRect(rrect, true);
67 const path = CanvasKit.Path.MakeFromSVGString(
75 expect(cmds).toEqual([[CanvasKit.MOVE_VERB, 205, 5],
76 [CanvasKit.LINE_VERB, 795, 5],
77 [CanvasKit.LINE_VERB, 595, 295],
78 [CanvasKit.LINE_VERB, 5, 295],
79 [CanvasKit.LINE_VERB, 205, 5],
80 [CanvasKit.CLOSE_VERB]]);
86 const pathOne = new CanvasKit.Path();
89 const pathTwo = new CanvasKit.Path();
92 const path = CanvasKit.Path.MakeFromOp(pathOne, pathTwo, CanvasKit.PathOp.Intersect);
95 expect(cmds).toEqual([[CanvasKit.MOVE_VERB, 15, 15],
96 [CanvasKit.LINE_VERB, 20, 15],
97 [CanvasKit.LINE_VERB, 20, 20],
98 [CanvasKit.LINE_VERB, 15, 20],
99 [CanvasKit.CLOSE_VERB]]);
106 const cmds = [[CanvasKit.MOVE_VERB, 205, 5],
107 [CanvasKit.LINE_VERB, 795, 5],
108 [CanvasKit.LINE_VERB, 595, 295],
109 [CanvasKit.LINE_VERB, 5, 295],
110 [CanvasKit.LINE_VERB, 205, 5],
111 [CanvasKit.CLOSE_VERB]];
112 const path = CanvasKit.Path.MakeFromCmds(cmds);
121 const mVerbs = CanvasKit.Malloc(Uint8Array, 6);
122 const mPoints = CanvasKit.Malloc(Float32Array, 18);
123 const mWeights = CanvasKit.Malloc(Float32Array, 1);
124 mVerbs.toTypedArray().set([CanvasKit.MOVE_VERB, CanvasKit.LINE_VERB,
125 CanvasKit.QUAD_VERB, CanvasKit.CONIC_VERB, CanvasKit.CUBIC_VERB, CanvasKit.CLOSE_VERB
138 let path = CanvasKit.Path.MakeFromVerbsPointsWeights(mVerbs, mPoints, mWeights);
142 [CanvasKit.MOVE_VERB, 1, 2],
143 [CanvasKit.LINE_VERB, 3, 4],
144 [CanvasKit.QUAD_VERB, 5, 6, 7, 8],
145 [CanvasKit.CONIC_VERB, 9, 10, 11, 12, 117],
146 [CanvasKit.CUBIC_VERB, 13, 14, 15, 16, 17, 18],
147 [CanvasKit.CLOSE_VERB],
152 path = CanvasKit.Path.MakeFromVerbsPointsWeights(mVerbs, mPoints.subarray(0, 10), mWeights);
156 [CanvasKit.MOVE_VERB, 1, 2],
157 [CanvasKit.LINE_VERB, 3, 4],
158 [CanvasKit.QUAD_VERB, 5, 6, 7, 8],
161 CanvasKit.Free(mVerbs);
162 CanvasKit.Free(mPoints);
163 CanvasKit.Free(mWeights);
167 const path = CanvasKit.Path.MakeFromVerbsPointsWeights(
168 [CanvasKit.MOVE_VERB, CanvasKit.LINE_VERB],
172 [CanvasKit.MOVE_VERB, 1, 2],
173 [CanvasKit.LINE_VERB, 3, 4]
177 [CanvasKit.QUAD_VERB, CanvasKit.CLOSE_VERB],
183 [CanvasKit.MOVE_VERB, 1, 2],
184 [CanvasKit.LINE_VERB, 3, 4],
185 [CanvasKit.QUAD_VERB, 5, 6, 7, 8],
186 [CanvasKit.CLOSE_VERB]
193 const mVerbs = CanvasKit.Malloc(Uint8Array, 6);
194 const mPoints = CanvasKit.Malloc(Float32Array, 18);
195 const mWeights = CanvasKit.Malloc(Float32Array, 1);
196 mVerbs.toTypedArray().set([CanvasKit.MOVE_VERB, CanvasKit.LINE_VERB,
197 CanvasKit.QUAD_VERB, CanvasKit.CONIC_VERB, CanvasKit.CUBIC_VERB, CanvasKit.CLOSE_VERB
210 const path = new CanvasKit.Path();
216 [CanvasKit.MOVE_VERB, 0, 0],
217 [CanvasKit.LINE_VERB, 77, 88],
218 [CanvasKit.MOVE_VERB, 1, 2],
219 [CanvasKit.LINE_VERB, 3, 4],
220 [CanvasKit.QUAD_VERB, 5, 6, 7, 8],
221 [CanvasKit.CONIC_VERB, 9, 10, 11, 12, 117],
222 [CanvasKit.CUBIC_VERB, 13, 14, 15, 16, 17, 18],
223 [CanvasKit.CLOSE_VERB],
231 CanvasKit.Free(mVerbs);
232 CanvasKit.Free(mPoints);
233 CanvasKit.Free(mWeights);
237 const path = new CanvasKit.Path();
256 const path = starPath(CanvasKit);
258 const paint = new CanvasKit.Paint();
259 paint.setStyle(CanvasKit.PaintStyle.Stroke);
262 paint.setColor(CanvasKit.BLACK);
264 canvas.clear(CanvasKit.WHITE);
275 const paint = new CanvasKit.Paint();
277 paint.setStyle(CanvasKit.PaintStyle.Stroke);
280 paint.setColor(CanvasKit.BLACK);
282 canvas.clear(CanvasKit.WHITE);
284 const path = new CanvasKit.Path();
287 path.addOval(CanvasKit.LTRBRect(10, 20, 100, 200), false, 3);
297 const paint = new CanvasKit.Paint();
299 paint.setStyle(CanvasKit.PaintStyle.Stroke);
302 paint.setColor(CanvasKit.BLACK);
304 canvas.clear(CanvasKit.WHITE);
306 const path = new CanvasKit.Path();
316 paint.setColor(CanvasKit.BLUE);
321 paint.setColor(CanvasKit.RED);
330 const paint = new CanvasKit.Paint();
332 paint.setStyle(CanvasKit.PaintStyle.Stroke);
335 paint.setColor(CanvasKit.BLACK);
337 canvas.clear(CanvasKit.WHITE);
339 const path = new CanvasKit.Path();
344 path.arcToOval(CanvasKit.LTRBRect(90, 10, 120, 200), 30, 300, true);
356 const paint = new CanvasKit.Paint();
359 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
360 paint.setStyle(CanvasKit.PaintStyle.Stroke);
362 const path = new CanvasKit.Path();
388 const path = new CanvasKit.Path();
397 const meas = new CanvasKit.ContourMeasureIter(path, false, 1);
430 const paint = new CanvasKit.Paint();
433 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
434 paint.setStyle(CanvasKit.PaintStyle.Stroke);
438 const pointsObj = CanvasKit.Malloc(Float32Array, 6 * 2);
442 const path = new CanvasKit.Path();
448 CanvasKit.Free(pointsObj);
456 canvas.clear(CanvasKit.WHITE);
458 const paint = new CanvasKit.Paint();
461 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
462 paint.setStyle(CanvasKit.PaintStyle.Stroke);
464 const arcpath = new CanvasKit.Path();
471 const path = new CanvasKit.Path();
472 path.addArc(CanvasKit.LTRBRect(10, 20, 100, 200), 30, 300)
473 .addRect(CanvasKit.LTRBRect(200, 200, 300, 300)) // test single arg, default cw
474 .addRect(CanvasKit.LTRBRect(240, 240, 260, 260), true) // test two arg, true means ccw
479 .addRRect(CanvasKit.RRectXY([350, 60, 450, 240], 20, 80), true) // Rect, rx, ry, ccw