29 bitmap->allocN32Pixels(64, 64);
35 for (
int y = 0;
y < 64;
y += 32) {
36 for (
int x = 0;
x < 64;
x += 32) {
57 canvas->translate(margin, margin);
60 canvas->translate(srcRect.
width() + margin, 0);
constexpr SkColor SK_ColorBLACK
#define SkDoubleToScalar(x)
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
void setColor(SkColor color)
static void draw(SkCanvas *canvas, const SkRect &rect, const SkBitmap &bitmap, const SkMatrix &matrix, const SkSamplingOptions &sampling)
DEF_SIMPLE_GM_BG(matriximagefilter, canvas, 420, 100, SK_ColorBLACK)
static void make_checkerboard(SkBitmap *bitmap)
unsigned useCenter Optional< SkMatrix > matrix
sk_sp< SkBlender > blender SkRect rect
SkSamplingOptions sampling
SkSamplingOptions(SkFilterMode::kLinear))
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static void checkerboard(SkCanvas *canvas, SkColor c1, SkColor c2, int size)