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

Go to the source code of this file.

Functions

 REG_FIDDLE (Bitmap_readyToDraw, 256, 160, false, 5)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Bitmap_readyToDraw  ,
256  ,
160  ,
false  ,
 
)

Definition at line 4 of file Bitmap_readyToDraw.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 if (source.readyToDraw()) {
7 canvas->drawImage(source.asImage(), 10, 10);
8 }
9}
10} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
sk_sp< SkImage > asImage() const
Definition: SkBitmap.cpp:645
bool readyToDraw() const
Definition: SkBitmap.h:758
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition: SkCanvas.h:1528
SkBitmap source
Definition: examples.cpp:28