60 {
61 struct {
62 int fWidth, fHeight;
63 int fRadiusX, fRadiusY;
64 } samples[] = {
65 { 140, 140, 0, 0 },
66 { 140, 140, 0, 2 },
67 { 140, 140, 2, 0 },
68 { 140, 140, 2, 2 },
69 { 24, 24, 25, 25 },
70 };
73
74 for (unsigned j = 0; j < 4; ++j) {
75 for (unsigned i = 0; i < std::size(samples); ++i) {
76 const SkIRect* cr = j & 0x02 ? &cropRect :
nullptr;
77 if (j & 0x01) {
79 samples[i].fRadiusX, samples[i].fRadiusY, nullptr, cr));
80 } else {
82 samples[i].fRadiusX, samples[i].fRadiusY, nullptr, cr));
83 }
85 }
86 }
87 }
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > Dilate(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
void drawClippedBitmap(SkCanvas *canvas, const SkPaint &paint, int x, int y)
static constexpr SkIRect MakeXYWH(int32_t x, int32_t y, int32_t w, int32_t h)