Flutter Engine
The Flutter Engine
Bitmap_readyToDraw.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(Bitmap_readyToDraw, 256, 160, false, 5) {
5void draw(SkCanvas* canvas) {
6 if (source.readyToDraw()) {
7 canvas->drawImage(source.asImage(), 10, 10);
8 }
9}
10} // END FIDDLE
REG_FIDDLE(Bitmap_readyToDraw, 256, 160, false, 5)
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