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.
3 #include "tools/fiddle/examples.h"
4 REG_FIDDLE(Path_isFinite, 256, 256, true, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6 auto debugster = [](const char* prefix, const SkPath& path) -> void {
7 SkDebugf("%s path is %s" "finite\n", prefix, path.isFinite() ? "" : "not ");
8 };
9 SkPath path;
10 debugster("initial", path);
11 path.lineTo(SK_ScalarMax, SK_ScalarMax);
12 debugster("after line", path);
13 SkMatrix matrix;
14 matrix.setScale(2, 2);
15 path.transform(matrix);
16 debugster("after scale", path);
17 }
18 } // END FIDDLE
19