Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 5 of file Rect_MakeIWH.cpp.

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