Go to the source code of this file.
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Image_readPixels |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
false |
, |
|
|
3 |
|
|
) |
| |
Definition at line 5 of file Image_readPixels.cpp.
5 {
7 canvas->
scale(.5f, .5f);
10 std::vector<int32_t> dstPixels;
14 for (
int x = 0;
x < 512;
x +=
width ) {
18 bitmap.installPixels(dstPixmap);
20 }
22 }
24 }
25}
26}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void translate(SkScalar dx, SkScalar dy)
void scale(SkScalar sx, SkScalar sy)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
bool readPixels(GrDirectContext *context, const SkImageInfo &dstInfo, void *dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint cachingHint=kAllow_CachingHint) const
static SkImageInfo MakeN32Premul(int width, int height)