Flutter Engine
The Flutter Engine
Functions
Rect_MakeIWH.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Rect_MakeIWH, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Rect_MakeIWH  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Rect_MakeIWH.cpp.

4 {
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
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