8#ifndef SkImageFilters_DEFINED
9#define SkImageFilters_DEFINED
47 struct CropRect :
public std::optional<SkRect> {
65 *
this = *optionalCrop;
71 return this->has_value() == o.has_value() &&
72 (!this->has_value() || this->
value() == *o);
89 const CropRect& cropRect = {});
100 const CropRect& cropRect = {});
111 const CropRect& cropRect = {});
138 const CropRect& cropRect = {});
186 const CropRect& cropRect = {});
202 const CropRect& cropRect = {});
218 const CropRect& cropRect = {});
249 return Image(std::move(
image), r, r, sampling);
270 const CropRect& cropRect = {});
295 const CropRect& cropRect = {});
318 const CropRect& cropRect = {});
328 return Merge(array, 2, cropRect);
339 const CropRect& cropRect = {});
354 return Picture(std::move(pic),
target);
377 std::string_view childShaderName,
379 return RuntimeShader(builder, 0.f, childShaderName, std::move(input));
395 std::string_view childShaderName,
416 std::string_view childShaderNames[],
419 return RuntimeShader(builder, 0.f, childShaderNames,
434 std::string_view childShaderNames[],
457 return Shader(std::move(shader), Dither::kNo, cropRect);
460 const CropRect& cropRect = {});
483 const CropRect& cropRect = {});
495 const CropRect& cropRect = {});
514 const CropRect& cropRect = {});
530 const CropRect& cropRect = {});
551 const CropRect& cropRect = {});
569 const CropRect& cropRect = {});
586 const CropRect& cropRect = {});
609 const CropRect& cropRect = {});
static std::unique_ptr< SkEncoder > Make(SkWStream *dst, const SkPixmap *src, const SkYUVAPixmaps *srcYUVA, const SkColorSpace *srcYUVAColorSpace, const SkJpegEncoder::Options &options)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
static sk_sp< SkImageFilter > Picture(sk_sp< SkPicture > pic)
static sk_sp< SkImageFilter > Merge(sk_sp< SkImageFilter > first, sk_sp< SkImageFilter > second, const CropRect &cropRect={})
static sk_sp< SkImageFilter > RuntimeShader(const SkRuntimeShaderBuilder &builder, std::string_view childShaderNames[], const sk_sp< SkImageFilter > inputs[], int inputCount)
static sk_sp< SkImageFilter > RuntimeShader(const SkRuntimeShaderBuilder &builder, std::string_view childShaderName, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Shader(sk_sp< SkShader > shader, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > Crop(const SkRect &rect, sk_sp< SkImageFilter > input)
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
sk_sp< PrecompileShader > Blur(sk_sp< PrecompileShader > child)
SK_API sk_sp< PrecompileShader > ColorFilter(SkSpan< const sk_sp< PrecompileShader > > shaders, SkSpan< const sk_sp< PrecompileColorFilter > > colorFilters)
SK_API sk_sp< PrecompileShader > Picture()
static SkRect inset(const SkRect &r)
CropRect(const SkIRect &crop)
CropRect(const std::nullopt_t &)
CropRect(const SkRect *optionalCrop)
CropRect(const SkIRect *optionalCrop)
bool operator==(const CropRect &o) const
CropRect(const std::optional< SkRect > &crop)
CropRect(const SkRect &crop)
static SkRect Make(const SkISize &size)
static constexpr SkRect MakeEmpty()