Debian Codegraph @

docs/examples/Rect_Make_2.cpp

raw
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(Rect_Make_2, 256, 256, true, 0) {
5 void draw(SkCanvas* canvas) {
6 SkIRect i_rect1 = {2, 35, 22, 53};
7 SkRect f_rect = SkRect::Make(i_rect1);
8 f_rect.offset(0.49f, 0.49f);
9 SkIRect i_rect2;
10 f_rect.round(&i_rect2);
11 SkDebugf("i_rect1 %c= i_rect2\n", i_rect1 == i_rect2? '=' : '!');
12 }
13 } // END FIDDLE