• Home
  • Raw
  • Download

Lines Matching refs:CanvasKit

7     var CanvasKit = null;
9 if (CanvasKit) {
15 CanvasKit = _CanvasKit;
55 const surface = CanvasKit.MakeCanvasSurface('test');
62 const paint = new CanvasKit.SkPaint();
65 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
66 paint.setStyle(CanvasKit.PaintStyle.Stroke);
68 const path = new CanvasKit.SkPath();
96 let rrect = new CanvasKit.SkPath()
116 const surface = CanvasKit.MakeCanvasSurface('test');
123 const paint = new CanvasKit.SkPaint();
126 paint.setColor(CanvasKit.Color(0, 0, 0, 1.0));
127 paint.setStyle(CanvasKit.PaintStyle.Stroke);
130 canvas.drawRoundRect(CanvasKit.LTRBRect(5, 35, 45, 80), 15, 10, paint);
132 canvas.drawOval(CanvasKit.LTRBRect(5, 35, 45, 80), paint);
134 canvas.drawArc(CanvasKit.LTRBRect(55, 35, 95, 80), 15, 270, true, paint);
136 const font = new CanvasKit.SkFont(null, 20);
139 const blob = CanvasKit.SkTextBlob.MakeFromText('Unicode chars �� é É ص', font);
152 function starPath(CanvasKit, X=128, Y=128, R=116) { argument
153 let p = new CanvasKit.SkPath();
164 const surface = CanvasKit.MakeCanvasSurface('test');
171 const path = starPath(CanvasKit);
173 const paint = new CanvasKit.SkPaint();
175 const textPaint = new CanvasKit.SkPaint();
176 textPaint.setColor(CanvasKit.Color(40, 0, 0, 1.0));
179 const textFont = new CanvasKit.SkFont(null, 30);
181 const dpe = CanvasKit.MakeSkDashPathEffect([15, 5, 5, 10], 1);
184 paint.setStyle(CanvasKit.PaintStyle.Stroke);
187 paint.setColor(CanvasKit.Color(66, 129, 164, 1.0));
189 canvas.clear(CanvasKit.Color(255, 255, 255, 1.0));
205 … let path = CanvasKit.MakePathFromSVGString('M 205,5 L 795,5 L 595,295 L 5,295 L 205,5 z');
212 expect(cmds).toEqual([[CanvasKit.MOVE_VERB, 205, 5],
213 [CanvasKit.LINE_VERB, 795, 5],
214 [CanvasKit.LINE_VERB, 595, 295],
215 [CanvasKit.LINE_VERB, 5, 295],
216 [CanvasKit.LINE_VERB, 205, 5],
217 [CanvasKit.CLOSE_VERB]]);
225 let cmds = [[CanvasKit.MOVE_VERB, 205, 5],
226 [CanvasKit.LINE_VERB, 795, 5],
227 [CanvasKit.LINE_VERB, 595, 295],
228 [CanvasKit.LINE_VERB, 5, 295],
229 [CanvasKit.LINE_VERB, 205, 5],
230 [CanvasKit.CLOSE_VERB]];
231 let path = CanvasKit.MakePathFromCmds(cmds);