Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Matrix_MakeTrans.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=b2479df0d9cf296ff64ac31e36684557
5REG_FIDDLE(Matrix_MakeTrans, 256, 256, false, 4) {
6void draw(SkCanvas* canvas) {
7 SkMatrix matrix = SkMatrix::Translate(64, 48);
8 for (int i = 0; i < 4; ++i) {
9 canvas->drawImage(image, 0, 0);
10 canvas->concat(matrix);
11 }
12}
13} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void concat(const SkMatrix &matrix)
void drawImage(const SkImage *image, SkScalar left, SkScalar top)
Definition SkCanvas.h:1528
static SkMatrix Translate(SkScalar dx, SkScalar dy)
Definition SkMatrix.h:91
sk_sp< SkImage > image
Definition examples.cpp:29
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60