32 paint.setAntiAlias(
true);
47 paint.setImageFilter(std::move(filter));
111 canvas->translate(5, 5);
114 canvas->translate(60, 0);
115 canvas->drawImageRect(
image, {0.5f, 0.5f, 50.5f, 50.5f},
sampling);
118 canvas->translate(60, 0);
122 canvas->drawRect({0.0f, 0.0f, 50.0f, 50.0f},
paint);
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
sk_sp< SkImage > asImage() const
void allocN32Pixels(int width, int height, bool isOpaque=false)
void eraseColor(SkColor4f) const
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
static SkMatrix Translate(SkScalar dx, SkScalar dy)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
SkISize getISize() override
GM(SkColor backgroundColor=SK_ColorWHITE)
sk_sp< const SkImage > image
SkSamplingOptions sampling
skia_private::AutoTArray< sk_sp< SkImageFilter > > filters TypedMatrix matrix TypedMatrix matrix SkScalar dx
SkSamplingOptions(SkFilterMode::kLinear))
static void draw_1_bitmap(SkCanvas *canvas, const SkBitmap &bm, bool doClip, int dx, int dy, sk_sp< SkImageFilter > filter)
static void make_bm(SkBitmap *bm)
DEF_SIMPLE_GM_BG(drawimagerect_filter, canvas, 180, 60, SK_ColorWHITE)
static constexpr SkISize Make(int32_t w, int32_t h)
void inset(float dx, float dy)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)