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