Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 5 of file Pixmap_const_SkImageInfo_const_star.cpp.

5 {
6void draw(SkCanvas* canvas) {
7 SkDebugf("image alpha only = %s\n", image->isAlphaOnly() ? "true" : "false");
8 SkPMColor pmColors = 0;
10 SkImages::RasterFromPixmapCopy({SkImageInfo::MakeA8(1, 1), (uint8_t*)&pmColors, 1});
11 SkDebugf("copy alpha only = %s\n", copy->isAlphaOnly() ? "true" : "false");
12}
13} // 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_sp< SkImage > image
Definition examples.cpp:29
SK_API sk_sp< SkImage > RasterFromPixmapCopy(const SkPixmap &pixmap)
Definition copy.py:1
static SkImageInfo MakeA8(int width, int height)