32 for (
int i = 0;
i < 2; ++
i) {
72 static const float matrix[20] = {-1.f, 0.f, 0.f, 0.f, 1.f,
73 0.f, -1.f, 0.f, 0.f, 1.f,
74 0.f, 0.f, -1.f, 0.f, 1.f,
75 0.f, 0.f, 0.f, 1.f, 0.f};
94 canvas->translate(140.f, -180.f);
107 canvas->concat(persp);
118 canvas->translate(15.f, 10.f);
121 canvas->saveLayer(
nullptr, &
p);
constexpr SkColor SK_ColorMAGENTA
constexpr SkColor SK_ColorCYAN
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorGREEN
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
sk_sp< SkImageFilter >(* FilterFactory)(const SkIRect *crop)
DEF_SIMPLE_GM(backdrop_imagefilter_croprect, canvas, 600, 500)
static sk_sp< SkImageFilter > make_invert_filter(const SkIRect *crop)
static sk_sp< SkImageFilter > make_blur_filter(const SkIRect *crop)
static void draw_backdrop_filter_gm(SkCanvas *canvas, float outsetX, float outsetY, FilterFactory factory)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
void translate(SkScalar dx, SkScalar dy)
void drawPaint(const SkPaint &paint)
@ kInitWithPrevious_SaveLayerFlag
initializes with previous contents
static sk_sp< SkColorFilter > Matrix(const SkColorMatrix &)
static sk_sp< SkImageFilter > ColorFilter(sk_sp< SkColorFilter > cf, 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={})
SkMatrix & setSkewX(SkScalar v)
SkMatrix & setPerspY(SkScalar v)
static const SkMatrix & I()
void setImageFilter(sk_sp< SkImageFilter > imageFilter)
unsigned useCenter Optional< SkMatrix > matrix
static constexpr SkPoint Make(float x, float y)
SkRect makeOutset(float dx, float dy) const
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
void roundOut(SkIRect *dst) const
static constexpr SkRect MakeWH(float w, float h)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)