1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC.
2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h"
4cb93a386Sopenharmony_ci// HASH=428ca171ae3bd0d3f992458ac598b97b
5cb93a386Sopenharmony_ciREG_FIDDLE(Matrix_mapPoints_2, 256, 256, false, 0) {
6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
7cb93a386Sopenharmony_ci    SkMatrix matrix;
8cb93a386Sopenharmony_ci    matrix.setRotate(35, 128, 128);
9cb93a386Sopenharmony_ci    const int count = 4;
10cb93a386Sopenharmony_ci    SkPoint pts[count];
11cb93a386Sopenharmony_ci    matrix.mapRectToQuad(pts, {40, 70, 180, 220} );
12cb93a386Sopenharmony_ci    SkPaint paint;
13cb93a386Sopenharmony_ci    paint.setARGB(77, 23, 99, 154);
14cb93a386Sopenharmony_ci    for (int i = 0; i < 5; ++i) {
15cb93a386Sopenharmony_ci        canvas->drawPoints(SkCanvas::kPolygon_PointMode, count, pts, paint);
16cb93a386Sopenharmony_ci        matrix.mapPoints(pts, count);
17cb93a386Sopenharmony_ci    }
18cb93a386Sopenharmony_ci}
19cb93a386Sopenharmony_ci}  // END FIDDLE
20