1cb93a386Sopenharmony_ci// Copyright 2019 Google LLC. 2cb93a386Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. 3cb93a386Sopenharmony_ci#include "tools/fiddle/examples.h" 4cb93a386Sopenharmony_ci// HASH=6631d36406efa3b3e27960c876421a7f 5cb93a386Sopenharmony_ciREG_FIDDLE(Region_getBoundaryPath, 256, 100, false, 0) { 6cb93a386Sopenharmony_civoid draw(SkCanvas* canvas) { 7cb93a386Sopenharmony_ci SkRegion region; 8cb93a386Sopenharmony_ci region.setRect({10, 20, 90, 60}); 9cb93a386Sopenharmony_ci region.op({30, 40, 60, 80}, SkRegion::kXOR_Op); 10cb93a386Sopenharmony_ci canvas->drawRegion(region, SkPaint()); 11cb93a386Sopenharmony_ci SkPath path; 12cb93a386Sopenharmony_ci region.getBoundaryPath(&path); 13cb93a386Sopenharmony_ci path.offset(100, 0); 14cb93a386Sopenharmony_ci canvas->drawPath(path, SkPaint()); 15cb93a386Sopenharmony_ci} 16cb93a386Sopenharmony_ci} // END FIDDLE 17