blob: 21705be5fd30e51a17df65749fd5974328d48d6a [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=eb6d290887e1a3a0b051b4d7b012f5e1
5REG_FIDDLE(Region_041, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 auto debugster = [](const char* label, SkRegion& region) -> void {
8 SkDebugf("%s: %s\n", label, region.quickContains(2, 2, 3, 3) ? "true" : "false");
9 };
10 SkRegion region({1, 2, 3, 4});
11 debugster("quickContains 1", region);
12 region.op({1, 4, 3, 6}, SkRegion::kUnion_Op);
13 debugster("quickContains 2", region);
14 region.op({1, 7, 3, 8}, SkRegion::kUnion_Op);
15 debugster("quickContains 3", region);
16}
17} // END FIDDLE