Lines Matching refs:canvas
27 static void draw_path(SkScalar size, SkCanvas* canvas, SkPaint paint) { in draw_path() argument
35 canvas->drawPath(path, paint); in draw_path()
38 void onDraw(SkCanvas* canvas) override { in onDraw() argument
42 canvas->translate(5.0f, 5.0f); in onDraw()
46 canvas->save(); in onDraw()
50 canvas->save(); in onDraw()
51 canvas->translate(size / 2.0f, size / 2.0f); in onDraw()
52 canvas->scale(scale, scale); in onDraw()
53 draw_path(size / 2.0f / scale, canvas, paint); in onDraw()
54 canvas->restore(); in onDraw()
56 canvas->save(); in onDraw()
57 canvas->translate(size / 2.0f, 80.0f + size / 2.0f); in onDraw()
58 canvas->scale(scale, scale); in onDraw()
59 canvas->drawCircle(0.0f, 0.0f, size / 2.0f / scale, paint); in onDraw()
60 canvas->restore(); in onDraw()
62 canvas->save(); in onDraw()
63 canvas->translate(0.0f, 160.0f); in onDraw()
64 canvas->scale(scale, scale); in onDraw()
65 canvas->drawRect(SkRect::MakeXYWH(0.0f, 0.0f, size / scale, size / scale), paint); in onDraw()
66 canvas->restore(); in onDraw()
68 canvas->save(); in onDraw()
69 canvas->translate(0.0f, 240.0f); in onDraw()
70 canvas->scale(scale, scale); in onDraw()
71 canvas->drawLine(0.0f, 0.0f, size / scale, size / scale, paint); in onDraw()
72 canvas->restore(); in onDraw()
74 canvas->translate(80.0f, 0.0f); in onDraw()