4REG_FIDDLE(Pixmap_writable_addrF16, 256, 64,
false, 0) {
7 uint16_t storage[2][4];
9 SkIRect topPixelBounds = {0, 0, 1, 1};
10 pixmap.
erase({ 0.65f, 0.45f, 0.25f, 1 }, &topPixelBounds);
11 SkIRect bottomPixelBounds = {0, 1, 1, 2};
12 pixmap.
erase({ 0.25f, 0.65f, 0.45f, 1 }, &bottomPixelBounds);
14 canvas->
scale(20, 20);
15 bitmap.installPixels(pixmap);
18 for (
int i = 0;
i < 4; ++
i) {
19 pixel2[
i] = storage[0][
i];
21 bitmap.installPixels(pixmap);
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
REG_FIDDLE(Pixmap_writable_addrF16, 256, 64, false, 0)
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
@ kRGBA_F16_SkColorType
pixel with half floats for red, green, blue, alpha;
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)
uint16_t * writable_addrF16(int x, int y) const
bool erase(SkColor color, const SkIRect &subset) const
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)