Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Matrix_mapPoints_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=428ca171ae3bd0d3f992458ac598b97b
5REG_FIDDLE(Matrix_mapPoints_2, 256, 256, false, 0) {
6void draw(SkCanvas* canvas) {
7 SkMatrix matrix;
8 matrix.setRotate(35, 128, 128);
9 const int count = 4;
10 SkPoint pts[count];
11 matrix.mapRectToQuad(pts, {40, 70, 180, 220} );
13 paint.setARGB(77, 23, 99, 154);
14 for (int i = 0; i < 5; ++i) {
16 matrix.mapPoints(pts, count);
17 }
18}
19} // END FIDDLE
int count
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void drawPoints(PointMode mode, size_t count, const SkPoint pts[], const SkPaint &paint)
@ kPolygon_PointMode
draw the array of points as a open polygon
Definition SkCanvas.h:1243
const Paint & paint
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60