Go to the source code of this file.
|
| REG_FIDDLE (Surface_MakeRaster, 256, 256, true, 0) |
|
◆ REG_FIDDLE()
REG_FIDDLE |
( |
Surface_MakeRaster |
, |
|
|
256 |
, |
|
|
256 |
, |
|
|
true |
, |
|
|
0 |
|
|
) |
| |
Definition at line 5 of file Surface_MakeRaster.cpp.
5 {
8 const size_t rowBytes = 64;
13 if (
surface->peekPixels(&pixmap)) {
14 const uint32_t* colorPtr = pixmap.
addr32();
18 for (
int y = 0;
y <
info.height(); ++
y) {
19 for (
int x = 0;
x <
info.width(); ++
x) {
20 SkDebugf(
"%c", colorPtr[
x] == pmWhite ?
'-' :
'x');
21 }
22 colorPtr += rowBytes / sizeof(colorPtr[0]);
24 }
25 }
26}
27}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
constexpr SkColor SK_ColorWHITE
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
void clear(SkColor color)
const uint32_t * addr32() const
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeN32Premul(int width, int height)