Flutter Engine
The Flutter Engine
State_Stack_b.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(State_Stack_b, 256, 128, false, 0) {
5void draw(SkCanvas* canvas) {
6 canvas->clipRect(SkRect::MakeWH(100, 100));
7 canvas->clear(SK_ColorRED);
8 canvas->scale(.5, .5);
9 canvas->clipRect(SkRect::MakeWH(100, 100));
10 canvas->clear(SK_ColorBLUE);
11}
12} // END FIDDLE
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
REG_FIDDLE(State_Stack_b, 256, 128, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1361
void clear(SkColor color)
Definition: SkCanvas.h:1199
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609