Flutter Engine
The Flutter Engine
Functions
Pixmap_const_SkImageInfo_const_star.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Pixmap_const_SkImageInfo_const_star, 256, 256, true, 3)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Pixmap_const_SkImageInfo_const_star  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Pixmap_const_SkImageInfo_const_star.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 SkDebugf("image alpha only = %s\n", image->isAlphaOnly() ? "true" : "false");
7 SkPMColor pmColors = 0;
9 SkImages::RasterFromPixmapCopy({SkImageInfo::MakeA8(1, 1), (uint8_t*)&pmColors, 1});
10 SkDebugf("copy alpha only = %s\n", copy->isAlphaOnly() ? "true" : "false");
11}
12} // END FIDDLE
uint32_t SkPMColor
Definition: SkColor.h:205
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
bool isAlphaOnly() const
Definition: SkImage.cpp:239
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
sk_sp< const SkImage > image
Definition: SkRecords.h:269
Definition: copy.py:1
static SkImageInfo MakeA8(int width, int height)