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=a1d6a6721b39350f81021f71a1b93208
5cb93a386Sopenharmony_ciREG_FIDDLE(Matrix_MakeRectToRect, 256, 256, true, 0) {
6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) {
7cb93a386Sopenharmony_ci    const SkRect srcs[] = { {0, 0, 0, 0}, {1, 2, 3, 4} };
8cb93a386Sopenharmony_ci    const SkRect dsts[] = { {0, 0, 0, 0}, {5, 6, 8, 9} };
9cb93a386Sopenharmony_ci    for (auto src : srcs) {
10cb93a386Sopenharmony_ci        for (auto dst : dsts) {
11cb93a386Sopenharmony_ci             SkMatrix matrix = SkMatrix::RectToRect(src, dst);
12cb93a386Sopenharmony_ci             SkDebugf("src: %g, %g, %g, %g  dst: %g, %g, %g, %g\n",
13cb93a386Sopenharmony_ci                      src.fLeft, src.fTop, src.fRight, src.fBottom,
14cb93a386Sopenharmony_ci                      dst.fLeft, dst.fTop, dst.fRight, dst.fBottom);
15cb93a386Sopenharmony_ci             matrix.dump();
16cb93a386Sopenharmony_ci        }
17cb93a386Sopenharmony_ci    }
18cb93a386Sopenharmony_ci}
19cb93a386Sopenharmony_ci}  // END FIDDLE
20