30 paint.setAntiAlias(
true);
33 return surface->makeImageSnapshot();
44 paint.setImageFilter(filter);
69 canvas->translate(40, 40);
70 for (
auto&& factory : factories) {
75 for (
const auto&
matrix : matrices) {
77 canvas->translate(spacer, 0);
81 canvas->translate(0, spacer);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorRED
void drawRect(const SkRect &rect, const SkPaint &paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
sk_sp< SkImageFilter > makeWithLocalMatrix(const SkMatrix &matrix) const
static sk_sp< SkImageFilter > Erode(SkScalar radiusX, SkScalar radiusY, sk_sp< SkImageFilter > input, 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 > 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={})
static SkMatrix Scale(SkScalar sx, SkScalar sy)
static SkMatrix Translate(SkScalar dx, SkScalar dy)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
sk_sp< SkImageFilter >(* ImageFilterFactory)()
static void show_image(SkCanvas *canvas, SkImage *image, sk_sp< SkImageFilter > filter)
DEF_SIMPLE_GM(localmatriximagefilter, canvas, 640, 640)
static sk_sp< SkImage > make_image(SkCanvas *rootCanvas)
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< const SkImage > image
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)
static SkRect MakeIWH(int w, int h)
SkRect makeOutset(float dx, float dy) const