Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Image_makeShader_2.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.
4// HASH=10172fca71b9dbdcade772513ffeb27e
5REG_FIDDLE(Image_makeShader_2, 256, 256, false, 5) {
6void draw(SkCanvas* canvas) {
7 SkMatrix matrix;
8 matrix.setRotate(45);
9 matrix.postTranslate(125, 30);
11 paint.setShader(image->makeShader(SkSamplingOptions(), matrix));
12 canvas->drawPaint(paint);
13}
14} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawPaint(const SkPaint &paint)
sk_sp< SkShader > makeShader(SkTileMode tmx, SkTileMode tmy, const SkSamplingOptions &, const SkMatrix *localMatrix=nullptr) const
Definition SkImage.cpp:179
const Paint & paint
sk_sp< SkImage > image
Definition examples.cpp:29
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60