19 {
22 return;
23 }
24
27
29
31
33
35
36 auto clampRect = drawRect.makeInset(20, 40);
37
38 canvas->translate(10, 10);
39
41 paint.setShader(std::move(shader));
42 canvas->drawRect(drawRect,
paint);
43
44 canvas->save();
47 paint.setShader(std::move(shader));
48 canvas->drawRect(drawRect,
paint);
49 canvas->restore();
50
51 canvas->save();
54 paint.setShader(std::move(shader));
55 canvas->drawRect(drawRect,
paint);
56 canvas->restore();
57
58 canvas->save();
62 paint.setShader(std::move(shader));
63 canvas->drawRect(drawRect,
paint);
64 canvas->restore();
65
67
73 };
74
75 for (const auto& sampler : kSamplers) {
78 sampler,
80
82 paint.setShader(std::move(shader));
83 canvas->drawRect(drawRect,
paint);
84
86 }
87}
static bool rotate(const SkDCubic &cubic, int zero, int index, SkDCubic &rotPath)
SkISize dimensions() const
sk_sp< SkImage > withDefaultMipmaps() const
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
virtual sk_sp< SkImage > makeSubset(GrDirectContext *direct, const SkIRect &subset) const =0
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix RotateDeg(SkScalar deg)
sk_sp< SkShader > makeWithLocalMatrix(const SkMatrix &) const
sk_sp< const SkImage > image
SK_API sk_sp< SkShader > CoordClamp(sk_sp< SkShader >, const SkRect &subset)
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
static constexpr SkSamplingOptions Aniso(int maxAniso)