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(IRect_MakeEmpty, 256, 256, true, 0) {
draw(SkCanvas * canvas)5 void draw(SkCanvas* canvas) {
6 SkIRect rect = SkIRect::MakeEmpty();
7 SkDebugf("MakeEmpty isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
8 rect.offset(10, 10);
9 SkDebugf("offset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
10 rect.inset(10, 10);
11 SkDebugf("inset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
12 rect.outset(20, 20);
13 SkDebugf("outset rect isEmpty: %s\n", rect.isEmpty() ? "true" : "false");
14 }
15 } // END FIDDLE
16