8REG_FIDDLE(Bitmap_installPixels_2, 256, 256,
false, 0) {
10 std::default_random_engine rng;
11 const auto randUint = [&rng](uint32_t
min, uint32_t
max) -> uint32_t {
12 return std::uniform_int_distribution<uint32_t>(
min,
max)(rng);
19 pixels[
x] = randUint(0, UINT_MAX);
23 canvas->
scale(32, 32);
REG_FIDDLE(Bitmap_installPixels_2, 256, 256, false, 0)
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
static float max(float r, float g, float b)
static float min(float r, float g, float b)
static SkImageInfo MakeN32(int width, int height, SkAlphaType at)