Flutter Engine
The Flutter Engine
Image_bounds.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(Image_bounds, 256, 128, false, 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
REG_FIDDLE(Image_bounds, 256, 128, false, 4)
Definition: Image_bounds.cpp:4
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