Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Region_Cliperator_done.cpp
Go to the documentation of this file.
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.
4// HASH=6cca7b96836266800d852664a1366453
5REG_FIDDLE(Region_Cliperator_done, 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
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
bool setRect(const SkIRect &rect)
Definition SkRegion.cpp:192
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60