Flutter Engine
The Flutter Engine
Rect_MakeIWH.cpp
Go to the documentation of this file.
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.
4REG_FIDDLE(Rect_MakeIWH, 256, 256, true, 0) {
5void draw(SkCanvas* canvas) {
6 SkIRect i_rect = SkIRect::MakeWH(25, 35);
7 SkRect f_rect = SkRect::MakeIWH(25, 35);
8 SkDebugf("i_rect width: %d f_rect width:%g\n", i_rect.width(), f_rect.width());
9 i_rect = SkIRect::MakeWH(125000111, 0);
10 f_rect = SkRect::MakeIWH(125000111, 0);
11 SkDebugf("i_rect width: %d f_rect width:%.0f\n", i_rect.width(), f_rect.width());
12}
13} // END FIDDLE
REG_FIDDLE(Rect_MakeIWH, 256, 256, true, 0)
Definition: Rect_MakeIWH.cpp:4
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
Definition: SkRect.h:32
constexpr int32_t width() const
Definition: SkRect.h:158
static constexpr SkIRect MakeWH(int32_t w, int32_t h)
Definition: SkRect.h:56
static SkRect MakeIWH(int w, int h)
Definition: SkRect.h:623
constexpr float width() const
Definition: SkRect.h:762