22 {
24
27
29 zoomOut.
setScale(0.7f, 0.7f, 128.f, 128.f);
30
32 canvas->saveLayer(layerRect, nullptr);
33 canvas->clipRRect(
rrect,
true);
35 canvas->restore();
36
37 canvas->concat(zoomOut);
39 canvas->saveLayer(layerRect, nullptr);
40 canvas->clipRRect(
rrect,
false);
42 canvas->restore();
43
44 constexpr SkPoint kPts[] = {{0.f, 0.f}, {256.f, 256.f}};
47 canvas->concat(zoomOut);
48 canvas->saveLayer(layerRect, nullptr);
49 canvas->clipRRect(
rrect,
true);
51 canvas->restore();
52
56 canvas->concat(zoomOut);
57 canvas->saveLayer(layerRect, nullptr);
58 canvas->clipRRect(
rrect,
false);
60 canvas->restore();
61}
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorGRAY
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
SkMatrix & setScale(SkScalar sx, SkScalar sy, SkScalar px, SkScalar py)
static SkRRect MakeRectXY(const SkRect &rect, SkScalar xRad, SkScalar yRad)
static constexpr SkPoint kPts[kPtsCount]
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)