Flutter Engine
The Flutter Engine
Matrix_mapPoints.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(Matrix_mapPoints, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 matrix.reset();
8 const int count = 4;
10 matrix.mapRectToQuad(src, {40, 70, 180, 220} );
12 paint.setARGB(77, 23, 99, 154);
13 for (int i = 0; i < 5; ++i) {
15 matrix.mapPoints(dst, src, count);
17 matrix.preRotate(35, 128, 128);
18 }
19}
20} // END FIDDLE
int count
Definition: FontMgrTest.cpp:50
REG_FIDDLE(Matrix_mapPoints, 256, 256, false, 0)
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)
Definition: SkCanvas.cpp:1710
@ kPolygon_PointMode
draw the array of points as a open polygon
Definition: SkCanvas.h:1243
const Paint & paint
Definition: color_source.cc:38
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
dst
Definition: cp.py:12