Debian Codegraph @

docs/examples/Path_copy_const_SkPath.cpp

raw
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_copy_const_SkPath, 256, 256, true, 0) {
5 void draw(SkCanvas* canvas) {
6 SkPath path = SkPathBuilder().lineTo(20, 20).detach();
7 SkPath path2 = SkPathBuilder(path).close().detach();
8 SkDebugf("path verbs: %d\n", path.countVerbs());
9 SkDebugf("path2 verbs: %d\n", path2.countVerbs());
10 path.reset();
11 SkDebugf("after reset\n" "path verbs: %d\n", path.countVerbs());
12 SkDebugf("path2 verbs: %d\n", path2.countVerbs());
13 }
14 } // END FIDDLE