68 {
70
77 };
80
81 for (
const auto&
sampling : samplings) {
82 this->
draw(canvas, srcRect, deviceSize,
sampling,
nullptr);
84 }
85
86 {
89 surfaceCanvas->
clear(0x000000);
90 {
92 paint.setColor(0xFF00FF00);
96 }
103 this->
draw(canvas, srcRect, deviceSize, samplings[3], std::move(
source));
104 }
105 }
constexpr SkColor SK_ColorBLACK
void clear(SkColor color)
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
void draw(SkCanvas *canvas, const SkRect &rect, const SkSize &deviceSize, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
sk_sp< const SkImage > image
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkCubicResampler Mitchell()
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkSamplingOptions Aniso(int maxAniso)
static constexpr SkSize Make(SkScalar w, SkScalar h)