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

5 {
6void draw(SkCanvas* canvas) {
8 for (int x : { 0, bounds.width() } ) {
9 for (int y : { 0, bounds.height() } ) {
10 canvas->drawImage(image, x, y);
11 }
12 }
13}
14} // 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
sk_sp< SkImage > image
Definition examples.cpp:29
double y
double x
Optional< SkRect > bounds
Definition SkRecords.h:189