6 uint32_t pixels[][4] = {
7 { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 },
8 { 0xFFFF0000, 0xFF000000, 0xFFFFFFFF, 0xFFFF0000 },
9 { 0xFFFF0000, 0xFFFFFFFF, 0xFF000000, 0xFFFF0000 },
10 { 0xFFFF0000, 0xFFFF0000, 0xFFFF0000, 0xFFFF0000 } };
13 (
void*) pixels,
sizeof(pixels[0]));
16 for (
auto constraint : {
REG_FIDDLE(Canvas_drawImageRect, 256, 64, false, 0)
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
sk_sp< SkImage > asImage() const
bool installPixels(const SkImageInfo &info, void *pixels, size_t rowBytes, void(*releaseProc)(void *addr, void *context), void *context)
void translate(SkScalar dx, SkScalar dy)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
@ kFast_SrcRectConstraint
sample outside bounds; faster
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
sk_sp< const SkImage > image
SkSamplingOptions sampling
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)