Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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.
4// HASH=faa660ac19eaddc3f3eab57a0bddfdcb
5REG_FIDDLE(Rect_MakeIWH, 256, 256, true, 0) {
6void draw(SkCanvas* canvas) {
7 SkIRect i_rect = SkIRect::MakeWH(25, 35);
8 SkRect f_rect = SkRect::MakeIWH(25, 35);
9 SkDebugf("i_rect width: %d f_rect width:%g\n", i_rect.width(), f_rect.width());
10 i_rect = SkIRect::MakeWH(125000111, 0);
11 f_rect = SkRect::MakeIWH(125000111, 0);
12 SkDebugf("i_rect width: %d f_rect width:%.0f\n", i_rect.width(), f_rect.width());
13}
14} // END FIDDLE
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
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
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