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

Go to the source code of this file.

Functions

 REG_FIDDLE (Rect_centerX, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Rect_centerX  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Rect_centerX.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 SkRect tests[] = {{20, 30, 41, 51}, {-20, -30, -41, -51}};
7 for (auto rect : tests) {
8 SkDebugf("left: %3g right: %3g centerX: %3g\n", rect.left(), rect.right(), rect.centerX());
9 rect.sort();
10 SkDebugf("left: %3g right: %3g centerX: %3g\n", rect.left(), rect.right(), rect.centerX());
11 }
12}
13} // END FIDDLE
static BlurTest tests[]
Definition: BlurTest.cpp:84
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
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350