skia2/docs/examples/Path_dump.cpp
Mike Reed edb22ec498 work on better SkPath::dump
ForceClose is a pain, and already removed from some
(hopefully all at some point) of our iterators

Follow-on plan: use raw iter, and output code compatible with
SkPath::Make()

Change-Id: Icda4ad2e605eb2fb9842dd35b5e0d4a0939e62eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/341237
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2020-12-06 19:47:31 +00:00

15 lines
464 B
C++

// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
#include "tools/fiddle/examples.h"
// HASH=8036d764452a62f9953af50846f0f3c0
REG_FIDDLE(Path_dump, 256, 256, true, 0) {
void draw(SkCanvas* canvas) {
SkPath path;
path.quadTo(20, 30, 40, 50);
for (bool dumpAsHex : { false, true } ) {
path.dump(nullptr, dumpAsHex);
SkDebugf("\n");
}
}
} // END FIDDLE