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

Go to the source code of this file.

Functions

 REG_FIDDLE (Bitmap_writePixels_2, 256, 80, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Bitmap_writePixels_2  ,
256  ,
80  ,
false  ,
 
)

Definition at line 4 of file Bitmap_writePixels_2.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 bitmap.allocPixels(SkImageInfo::MakeN32Premul(2, 2));
8 bitmap.eraseColor(SK_ColorGREEN);
9 SkPMColor color = 0xFF5599BB;
11 bitmap.writePixels(src);
12 canvas->scale(40, 40);
13 canvas->drawImage(bitmap.asImage(), 0, 0);
14}
15} // END FIDDLE
uint32_t SkPMColor
Definition: SkColor.h:205
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition: SkCanvas.h:1528
DlColor color
Definition: bitmap.py:1
static SkImageInfo MakeN32Premul(int width, int height)