53 for (
int i = 0;
i < 4;
i++) {
69 DrawClippedImage(canvas, fBitmap.
get(),
paint, 2, cropRect);
85 if (
clipRect.intersect(cropRectFloat)) {
112 const SkIRect* cropR =
nullptr,
const SkRect* clipR =
nullptr) {
116 p.setColor(0xFF00FF00);
124 p.setColor(0x66FF00FF);
132 p.setColor(0x660000FF);
140 p.setImageFilter(std::move(imgf));
142 p.setColor(0x66FF0000);
160 this->doDraw(canvas, r,
nullptr);
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
#define INHERITED(method,...)
void onOnceBeforeDraw() override
SkISize getISize() override
SkString getName() const override
void onDraw(SkCanvas *canvas) override
SimpleOffsetImageFilterGM()
SkString getName() const override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
void doDraw(SkCanvas *canvas, const SkRect &r, sk_sp< SkImageFilter > imgf, const SkIRect *cropR=nullptr, const SkRect *clipR=nullptr)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void clear(SkColor color)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > Offset(SkScalar dx, SkScalar dy, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static SkMatrix Scale(SkScalar sx, SkScalar sy)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
void setStrokeWidth(SkScalar width)
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw
sk_sp< const SkImage > image
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)
static constexpr SkISize Make(int32_t w, int32_t h)
static SkRect Make(const SkISize &size)
static SkRect MakeIWH(int w, int h)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
SkRect makeInset(float dx, float dy) const