4REG_FIDDLE(Canvas_drawImageRect_4, 256, 64,
false, 0) {
10 (
void*) pixels,
sizeof(pixels[0]));
14 for (
auto alpha : { 50, 100, 150, 255 } ) {
15 paint.setAlpha(alpha);
REG_FIDDLE(Canvas_drawImageRect_4, 256, 64, false, 0)
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorWHITE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
@ kStrict_SrcRectConstraint
sample only inside bounds; slower
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
void scale(SkScalar sx, SkScalar sy)
sk_sp< const SkImage > image
SkSamplingOptions(SkFilterMode::kLinear))
static SkImageInfo MakeN32Premul(int width, int height)
static constexpr SkRect MakeWH(float w, float h)