Go to the source code of this file.
◆ DEF_SIMPLE_GM_BG()
DEF_SIMPLE_GM_BG |
( |
matriximagefilter |
, |
|
|
canvas |
, |
|
|
420 |
, |
|
|
100 |
, |
|
|
SK_ColorBLACK |
|
|
) |
| |
Definition at line 48 of file matriximagefilter.cpp.
48 {
54
56
57 canvas->translate(margin, margin);
59
60 canvas->translate(srcRect.
width() + margin, 0);
62}
#define SkDoubleToScalar(x)
static void draw(SkCanvas *canvas, const SkRect &rect, const SkBitmap &bitmap, const SkMatrix &matrix, const SkSamplingOptions &sampling)
static void make_checkerboard(SkBitmap *bitmap)
unsigned useCenter Optional< SkMatrix > matrix
SkSamplingOptions(SkFilterMode::kLinear))
constexpr float width() const
static constexpr SkRect MakeWH(float w, float h)
static void checkerboard(SkCanvas *canvas, SkColor c1, SkColor c2, int size)
◆ draw()
Definition at line 19 of file matriximagefilter.cpp.
20 {
26}
int saveLayer(const SkRect *bounds, const SkPaint *paint)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static sk_sp< SkImageFilter > MatrixTransform(const SkMatrix &matrix, const SkSamplingOptions &sampling, sk_sp< SkImageFilter > input)
sk_sp< SkBlender > blender SkRect rect
SkSamplingOptions sampling
◆ make_checkerboard()
static void make_checkerboard |
( |
SkBitmap * |
bitmap | ) |
|
|
static |
Definition at line 28 of file matriximagefilter.cpp.
28 {
29 bitmap->allocN32Pixels(64, 64);
35 for (
int y = 0;
y < 64;
y += 32) {
36 for (
int x = 0;
x < 64;
x += 32) {
37 canvas.save();
43 canvas.restore();
44 }
45 }
46}
void setColor(SkColor color)
static constexpr SkRect MakeXYWH(float x, float y, float w, float h)