Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
Rect_joinPossiblyEmptyRect.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Rect_joinPossiblyEmptyRect, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Rect_joinPossiblyEmptyRect  ,
256  ,
256  ,
true  ,
 
)

Definition at line 5 of file Rect_joinPossiblyEmptyRect.cpp.

5 {
6void draw(SkCanvas* canvas) {
7 SkRect rect = { 10, 100, 15, 0};
8 SkRect sorted = rect.makeSorted();
9 SkRect toJoin = { 50, 60, 55, 65 };
10 rect.joinPossiblyEmptyRect(toJoin);
11 SkDebugf("rect: %g, %g, %g, %g\n", rect.fLeft, rect.fTop, rect.fRight, rect.fBottom);
12 sorted.joinPossiblyEmptyRect(toJoin);
13 SkDebugf("sorted: %g, %g, %g, %g\n", sorted.fLeft, sorted.fTop, sorted.fRight, sorted.fBottom);
14}
15} // 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
sk_sp< SkBlender > blender SkRect rect
Definition SkRecords.h:350
SkScalar fBottom
larger y-axis bounds
Definition extension.cpp:17
void joinPossiblyEmptyRect(const SkRect &r)
Definition SkRect.h:1174
SkScalar fLeft
smaller x-axis bounds
Definition extension.cpp:14
SkScalar fRight
larger x-axis bounds
Definition extension.cpp:16
SkScalar fTop
smaller y-axis bounds
Definition extension.cpp:15