36 auto clampRect = drawRect.makeInset(20, 40);
38 canvas->translate(10, 10);
41 paint.setShader(std::move(shader));
42 canvas->drawRect(drawRect,
paint);
47 paint.setShader(std::move(shader));
48 canvas->drawRect(drawRect,
paint);
54 paint.setShader(std::move(shader));
55 canvas->drawRect(drawRect,
paint);
62 paint.setShader(std::move(shader));
63 canvas->drawRect(drawRect,
paint);
75 for (
const auto& sampler : kSamplers) {
82 paint.setShader(std::move(shader));
83 canvas->drawRect(drawRect,
paint);
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
DEF_SIMPLE_GM(coordclampshader, canvas, 1074, 795)
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)