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

Go to the source code of this file.

Functions

 REG_FIDDLE (Image_bounds, 256, 128, false, 4)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Image_bounds  ,
256  ,
128  ,
false  ,
 
)

Definition at line 4 of file Image_bounds.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 for (int x : { 0, bounds.width() } ) {
8 for (int y : { 0, bounds.height() } ) {
9 canvas->drawImage(image, x, y);
10 }
11 }
12}
13} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition: SkCanvas.h:1528
SkIRect bounds() const
Definition: SkImage.h:303
double y
double x
Optional< SkRect > bounds
Definition: SkRecords.h:189
sk_sp< const SkImage > image
Definition: SkRecords.h:269
Definition: SkRect.h:32