blob: b824aa9d8ac6fc41be6daf87ab26bc35de7f0838 [file] [log] [blame]
Hal Canary83c2f702019-03-07 14:53:03 -05001// 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 "fiddle/examples.h"
4// HASH=6cca7b96836266800d852664a1366453
5REG_FIDDLE(Region_009, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 auto debugster = [](const char* label, SkRegion& region) -> void {
8 SkRegion::Cliperator clipper(region, {0, 0, 5, 5});
9 SkDebugf("%14s done=%s\n", label, clipper.done() ? "true" : "false");
10 };
11 SkRegion region;
12 debugster("empty region", region);
13 region.setRect({1, 2, 3, 4});
14 debugster("after add rect", region);
15}
16} // END FIDDLE