42 {
44 {
51 std::move(erode)));
53
58 }
59 {
61
62 float matrix[20] = { 1, 0, 0, 0, 0,
63 0, 1, 0, 0, 0,
64 0, 0, 1, 0, 0,
65 0, 0, 0, 0.5f, 0 };
66
69 std::move(morph)));
72 std::move(colorMorph)));
73
74 DrawClippedImage(canvas, fImage.
get(),
paint);
76 }
77 {
78 float matrix[20] = { 1, 0, 0, 0, 0,
79 0, 1, 0, 0, 0,
80 0, 0, 1, 0, 0,
81 0, 0, 0, 0.5f, 0 };
84 nullptr));
86
89 0, 1, 1, 0, true, std::move(matrixFilter), std::move(offsetFilter), nullptr));
90
91 DrawClippedImage(canvas, fImage.
get(),
paint);
93 }
94 {
96
101 DrawClippedImage(canvas, fImage.
get(),
paint);
103 }
104 {
105
106
107
108
110
112 -1, 7, -1,
113 -1, -1, -1 };
117 bool convolveAlpha = false;
120 std::move(dilate)));
121
123 paint.setImageFilter(std::move(convolve));
124 DrawClippedImage(canvas, fImage.
get(),
paint);
126 }
127 {
128
134 std::move(cf1), nullptr, &outerRect));
136 std::move(cf2), std::move(color1), &innerRect));
137
139 paint.setImageFilter(std::move(color2));
143 }
144 }
static void merge(const uint8_t *SK_RESTRICT row, int rowN, const SkAlpha *SK_RESTRICT srcAA, const int16_t *SK_RESTRICT srcRuns, SkAlpha *SK_RESTRICT dstAA, int16_t *SK_RESTRICT dstRuns, int width)
@ kSrcOver
r = s + (1-sa)*d
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
void clear(SkColor color)
static sk_sp< SkColorFilter > Blend(const SkColor4f &c, sk_sp< SkColorSpace >, SkBlendMode mode)
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkImageFilter > MatrixConvolution(const SkISize &kernelSize, const SkScalar kernel[], SkScalar gain, SkScalar bias, const SkIPoint &kernelOffset, SkTileMode tileMode, bool convolveAlpha, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Merge(sk_sp< SkImageFilter > *const filters, int count, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Arithmetic(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4, bool enforcePMColor, sk_sp< SkImageFilter > background, sk_sp< SkImageFilter > foreground, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Image(sk_sp< SkImage > image, const SkRect &srcRect, const SkRect &dstRect, const SkSamplingOptions &sampling)
static sk_sp< SkImageFilter > Blend(SkBlendMode mode, sk_sp< SkImageFilter > background, sk_sp< SkImageFilter > foreground=nullptr, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Offset(SkScalar dx, SkScalar dy, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
unsigned useCenter Optional< SkMatrix > matrix
static constexpr SkIPoint Make(int32_t x, int32_t y)
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 SkRect MakeXYWH(float x, float y, float w, float h)