Lines Matching refs:canvas
13 static void drawline(SkCanvas* canvas, int on, int off, const SkPaint& paint, in drawline() argument
25 canvas->drawLine(startX, startY, finalX, finalY, p); in drawline()
31 static void show_giant_dash(SkCanvas* canvas) { in show_giant_dash() argument
34 drawline(canvas, 1, 1, paint, SkIntToScalar(20 * 1000)); in show_giant_dash()
37 static void show_zero_len_dash(SkCanvas* canvas) { in show_zero_len_dash() argument
40 drawline(canvas, 2, 2, paint, SkIntToScalar(0)); in show_zero_len_dash()
43 canvas->translate(0, SkIntToScalar(20)); in show_zero_len_dash()
44 drawline(canvas, 4, 4, paint, SkIntToScalar(0)); in show_zero_len_dash()
59 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
71 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw()
72 canvas->translate(0, SK_ScalarHalf); in onDraw()
82 drawline(canvas, gData[data].fOnInterval * scale, in onDraw()
85 canvas->translate(0, SkIntToScalar(20)); in onDraw()
90 show_giant_dash(canvas); in onDraw()
91 canvas->translate(0, SkIntToScalar(20)); in onDraw()
92 show_zero_len_dash(canvas); in onDraw()
143 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
181 canvas->drawPath(path, paint); in onDraw()
204 void drawDashedLines(SkCanvas* canvas, in drawDashedLines() argument
229 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, pts, p); in drawDashedLines()
238 canvas->drawPoints(SkCanvas::kLines_PointMode, 2, pts, p); in drawDashedLines()
242 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
244 canvas->save(); in onDraw()
245 canvas->translate(2, 0); in onDraw()
246 this->drawDashedLines(canvas, 100, 0, SK_Scalar1, 1, false); in onDraw()
247 canvas->restore(); in onDraw()
250 canvas->save(); in onDraw()
251 canvas->translate(112, 0); in onDraw()
252 this->drawDashedLines(canvas, 100, SK_ScalarHalf, SK_Scalar1, 1, false); in onDraw()
253 canvas->restore(); in onDraw()
256 canvas->save(); in onDraw()
257 canvas->translate(222, 0); in onDraw()
258 this->drawDashedLines(canvas, 100, SK_Scalar1, SK_Scalar1, 1, false); in onDraw()
259 canvas->restore(); in onDraw()
262 canvas->save(); in onDraw()
263 canvas->translate(332, 0); in onDraw()
264 this->drawDashedLines(canvas, 99.5f, SK_ScalarHalf, SK_Scalar1, 1, false); in onDraw()
265 canvas->restore(); in onDraw()
268 canvas->save(); in onDraw()
269 canvas->translate(446, 0); in onDraw()
270 this->drawDashedLines(canvas, 100, 0, SkIntToScalar(255), 1, false); in onDraw()
271 canvas->restore(); in onDraw()
274 canvas->save(); in onDraw()
275 canvas->translate(2, 110); in onDraw()
276 this->drawDashedLines(canvas, 100, 0, SkIntToScalar(3), 3, false); in onDraw()
277 canvas->restore(); in onDraw()
280 canvas->save(); in onDraw()
281 canvas->translate(112, 110); in onDraw()
282 this->drawDashedLines(canvas, 100, 1.5f, SkIntToScalar(3), 3, false); in onDraw()
283 canvas->restore(); in onDraw()
286 canvas->save(); in onDraw()
287 canvas->translate(2, 220); in onDraw()
288 this->drawDashedLines(canvas, 100, SK_Scalar1, SK_Scalar1, 1, true); in onDraw()
289 canvas->restore(); in onDraw()
292 canvas->save(); in onDraw()
293 canvas->translate(112, 220); in onDraw()
294 this->drawDashedLines(canvas, 100, 0, SkIntToScalar(3), 3, true); in onDraw()
295 canvas->restore(); in onDraw()
298 canvas->save(); in onDraw()
299 canvas->translate(332+SK_ScalarRoot2Over2*100, 110+SK_ScalarRoot2Over2*100); in onDraw()
300 canvas->rotate(45); in onDraw()
301 canvas->translate(-50, -50); in onDraw()
303 this->drawDashedLines(canvas, 100, SK_Scalar1, SK_Scalar1, 1, false); in onDraw()
304 canvas->restore(); in onDraw()
308 canvas->save(); in onDraw()
309 canvas->translate(SkIntToScalar(phase*110+2), in onDraw()
311 … this->drawDashedLines(canvas, 100, SkIntToScalar(phase), SkIntToScalar(3), 1, false); in onDraw()
312 canvas->restore(); in onDraw()
332 virtual void onDraw(SkCanvas* canvas) { in onDraw() argument
345 canvas->translate(SkIntToScalar(20), SkIntToScalar(20)); in onDraw()
346 canvas->translate(0, SK_ScalarHalf); in onDraw()
361 drawline(canvas, gData[data].fOnInterval * scale, in onDraw()
364 canvas->translate(0, SkIntToScalar(20)); in onDraw()
375 drawline(canvas, 32, 16, paint, 20.f, 0, 5.f); in onDraw()
376 canvas->translate(0, SkIntToScalar(20)); in onDraw()
379 drawline(canvas, 32, 16, paint, 56.f, 0, 5.f); in onDraw()
380 canvas->translate(0, SkIntToScalar(20)); in onDraw()
383 drawline(canvas, 32, 16, paint, 584.f, 0, 5.f); in onDraw()
384 canvas->translate(0, SkIntToScalar(20)); in onDraw()
388 drawline(canvas, 32, 16, paint, 600.f, 30.f); in onDraw()
389 canvas->translate(0, SkIntToScalar(20)); in onDraw()
392 drawline(canvas, 32, 16, paint, 8.f, 0.f, 40.f); in onDraw()
393 canvas->translate(0, SkIntToScalar(20)); in onDraw()
418 void onDraw(SkCanvas* canvas) override { in onDraw() argument
443 canvas->concat(rot); in onDraw()
452 drawline(canvas, kOn, kOff, paint, in onDraw()
463 drawline(canvas, kOn, kOff, paint, in onDraw()