Lines Matching refs:canvas
37 static void test_fade(SkCanvas* canvas) {
38 SkAutoCanvasRestore ar(canvas, true);
45 SkAutoCanvasRestore ar2(canvas, false);
50 canvas->clipRect(r);
53 canvas->saveLayer(&r, nullptr);
57 canvas->saveLayer(&r, nullptr);
64 canvas->saveLayerAlpha(&r, 0x80);
69 canvas->drawOval(r, p);
71 canvas->restore();
78 canvas->drawOval(r, p);
92 canvas->drawRect(r, paint);
97 canvas->drawRect(r, paint);
128 void drawBG(SkCanvas* canvas) {
129 canvas->drawColor(SK_ColorGRAY);
132 void onDraw(SkCanvas* canvas) override {
133 this->drawBG(canvas);
140 canvas->saveLayer(&r, &p);
141 canvas->drawColor(0xFFFF0000);
144 canvas->drawOval(r, p);
145 canvas->restore();
158 canvas->saveLayer(&r, &p);
160 canvas->drawOval(r, p);
161 canvas->restore();
166 canvas->drawOval(r, p);
174 canvas->translate(SkIntToScalar(300), 0);
180 canvas->saveLayer(&r, &p);
185 canvas->drawOval(r, p);
186 canvas->restore();
190 test_fade(canvas);
230 void onDrawContent(SkCanvas* canvas) override {
231 canvas->drawImage(fImage.get(), 0, 0, nullptr);
242 canvas->clipPath(path, kIntersect_SkClipOp, true);
247 canvas->saveLayer({ &bounds, &paint, fFilter.get(), nullptr, nullptr, 0 });
249 canvas->restore();