Flutter Engine
The Flutter Engine
third_party
skia
docs
examples
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.
3
#include "
tools/fiddle/examples.h
"
4
REG_FIDDLE
(Bitmap_readyToDraw, 256, 160,
false
, 5) {
5
void
draw
(
SkCanvas
* canvas) {
6
if
(
source
.
readyToDraw
()) {
7
canvas->
drawImage
(
source
.
asImage
(), 10, 10);
8
}
9
}
10
}
// END FIDDLE
REG_FIDDLE
REG_FIDDLE(Bitmap_readyToDraw, 256, 160, false, 5)
Definition:
Bitmap_readyToDraw.cpp:4
draw
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition:
aaclip.cpp:27
SkBitmap::asImage
sk_sp< SkImage > asImage() const
Definition:
SkBitmap.cpp:645
SkBitmap::readyToDraw
bool readyToDraw() const
Definition:
SkBitmap.h:758
SkCanvas
Definition:
SkCanvas.h:106
SkCanvas::drawImage
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition:
SkCanvas.h:1528
source
SkBitmap source
Definition:
examples.cpp:28
examples.h
Generated on Sun Jun 23 2024 21:55:54 for Flutter Engine by
1.9.4