Flutter Engine
The Flutter Engine
|
#include <Rect.h>
Classes | |
struct | ComplementRect |
Public Member Functions | |
AI | Rect ()=default |
AI | Rect (float l, float t, float r, float b) |
AI | Rect (float2 topLeft, float2 botRight) |
AI | Rect (const SkRect &r) |
AI bool | operator== (Rect rect) const |
AI bool | operator!= (Rect rect) const |
AI const float4 & | vals () const |
AI float4 & | vals () |
AI float | x () const |
AI float | y () const |
AI float | left () const |
AI float | top () const |
AI float | right () const |
AI float | bot () const |
AI float2 | topLeft () const |
AI float2 | botRight () const |
AI float4 | ltrb () const |
AI void | setLeft (float left) |
AI void | setTop (float top) |
AI void | setRight (float right) |
AI void | setBot (float bot) |
AI void | setTopLeft (float2 topLeft) |
AI void | setBotRight (float2 botRight) |
AI SkRect | asSkRect () const |
AI SkIRect | asSkIRect () const |
AI bool | isEmptyNegativeOrNaN () const |
AI float2 | size () const |
AI float2 | center () const |
AI float | area () const |
AI bool | intersects (ComplementRect comp) const |
AI bool | contains (Rect rect) const |
AI Rect | makeRoundIn () const |
AI Rect | makeRoundOut () const |
AI Rect | makeInset (float inset) const |
AI Rect | makeInset (float2 inset) const |
AI Rect | makeOutset (float outset) const |
AI Rect | makeOutset (float2 outset) const |
AI Rect | makeOffset (float2 offset) const |
AI Rect | makeJoin (Rect rect) const |
AI Rect | makeIntersect (Rect rect) const |
AI Rect | makeSorted () const |
AI Rect & | roundIn () |
AI Rect & | roundOut () |
AI Rect & | inset (float inset) |
AI Rect & | inset (float2 inset) |
AI Rect & | outset (float outset) |
AI Rect & | outset (float2 outset) |
AI Rect & | offset (float2 offset) |
AI Rect & | join (Rect rect) |
AI Rect & | intersect (Rect rect) |
AI Rect & | sort () |
Static Public Member Functions | |
static AI Rect | LTRB (float4 ltrb) |
static AI Rect | XYWH (float x, float y, float w, float h) |
static AI Rect | XYWH (float2 topLeft, float2 size) |
static AI Rect | WH (float w, float h) |
static AI Rect | WH (float2 size) |
static AI Rect | Point (float2 p) |
static AI Rect | FromVals (float4 vals) |
static AI Rect | Infinite () |
static AI Rect | InfiniteInverted () |
SIMD rect implementation. Values are stored internally in the form: [left, top, -right, -bot].
Some operations (e.g., intersect, inset) may return a negative or empty rect (negative meaning, left >= right or top >= bot).
Operations on a rect that is either negative or empty, while well-defined, might not give the intended result. It is the caller's responsibility to check isEmptyOrNegative() if needed.
|
default |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |