47 canvas->
scale(deviceScaleX, deviceScaleY);
58 paint.setColor(0xFF00FF00);
81 for (
const auto&
sampling : samplings) {
82 this->
draw(canvas, srcRect, deviceSize,
sampling,
nullptr);
89 surfaceCanvas->
clear(0x000000);
92 paint.setColor(0xFF00FF00);
103 this->
draw(canvas, srcRect, deviceSize, samplings[3], std::move(
source));
108 using INHERITED =
GM;
113DEF_GM(
return new ResizeGM; )
constexpr SkColor SK_ColorBLACK
#define SkScalarInvert(x)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawOval(const SkRect &oval, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
SkMatrix getLocalToDeviceAs3x3() const
void clear(SkColor color)
void scale(SkScalar sx, SkScalar sy)
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
bool mapRect(SkRect *dst, const SkRect &src, SkApplyPerspectiveClip pc=SkApplyPerspectiveClip::kYes) const
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
GM(SkColor backgroundColor=SK_ColorWHITE)
SkString getName() const override
void onDraw(SkCanvas *canvas) override
void draw(SkCanvas *canvas, const SkRect &rect, const SkSize &deviceSize, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
SkISize getISize() override
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
sk_sp< SkBlender > blender SkRect rect
SkSamplingOptions sampling
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
DEF_GM(return F(C(clipbox), 0.0f, 0.0f, {})) DEF_GM(return F(C(clipbox)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkCubicResampler Mitchell()
static constexpr SkISize Make(int32_t w, int32_t h)
static SkImageInfo MakeN32Premul(int width, int height)
void inset(float dx, float dy)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float height() const
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkSamplingOptions Aniso(int maxAniso)
static constexpr SkSize Make(SkScalar w, SkScalar h)