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(Region_getBoundaryPath, 256, 100, false, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6 SkRegion region;
7 region.setRect({10, 20, 90, 60});
8 region.op({30, 40, 60, 80}, SkRegion::kXOR_Op);
9 canvas->drawRegion(region, SkPaint());
10 SkPath path;
11 region.getBoundaryPath(&path);
12 path.offset(100, 0);
13 canvas->drawPath(path, SkPaint());
14 }
15 } // END FIDDLE
16