| 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_isInterpolatable, 256, 256, true, 0) { |
| 5 |
void draw(SkCanvas* canvas) { |
| 6 |
SkPath path, path2; |
| 7 |
path = SkPathBuilder() |
| 8 |
.moveTo(20, 20) |
| 9 |
.lineTo(40, 40) |
| 10 |
.lineTo(20, 20) |
| 11 |
.lineTo(40, 40) |
| 12 |
.close() |
| 13 |
.detach(); |
| 14 |
path2 = SkPath::Rect({20, 20, 40, 40}); |
| 15 |
SkDebugf("paths are " "%s" "interpolatable", path.isInterpolatable(path2) ? "" : "not "); |
| 16 |
} |
| 17 |
} // END FIDDLE |