class Rectangle
Defined at line 21 of file ../../src/ui/scenic/lib/types/rectangle.h
Safer, more convenient alternative to `fuchsia_math::Rect`.
Public Methods
void Rectangle (const Rectangle & )
Defined at line 61 of file ../../src/ui/scenic/lib/types/rectangle.h
void Rectangle (Rectangle && )
Defined at line 62 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle & operator= (const Rectangle & )
Defined at line 63 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle & operator= (Rectangle && )
Defined at line 64 of file ../../src/ui/scenic/lib/types/rectangle.h
void ~Rectangle ()
Defined at line 65 of file ../../src/ui/scenic/lib/types/rectangle.h
const Point2 & origin ()
Defined at line 75 of file ../../src/ui/scenic/lib/types/rectangle.h
const Extent2 & extent ()
Defined at line 76 of file ../../src/ui/scenic/lib/types/rectangle.h
Point2 opposite ()
The corner diagonally opposite from the origin.
Defined at line 78 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t x ()
Defined at line 80 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t y ()
Defined at line 81 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t width ()
Defined at line 82 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t height ()
Defined at line 83 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const Rectangle::ConstructorArgs & args, bool should_assert)
Returns true iff the args can be used to construct a valid Rectangle.
If `should_assert` is true, invalid args will trigger a FX_DCHECK.
Validity constraints:
- signed/unsigned conversion MUST NOT result in numeric overflow
- both the origin and opposite corner MUST be representable without numeric overflow
Defined at line 106 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::Rect & rect, bool should_assert)
static
Defined at line 138 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::wire::Rect & rect, bool should_assert)
static
Defined at line 145 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::RectU & rect, bool should_assert)
static
Defined at line 151 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::wire::RectU & rect, bool should_assert)
static
Defined at line 168 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const Point2 &origin,const Extent2 &extent,boolshould_assert)
static
Defined at line 185 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::Rect & fidl_rectangle)
Constructors. All arguments must be valid; use `IsValid()` to validate if you're not sure.
Defined at line 199 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::wire::Rect & fidl_rectangle)
static
Defined at line 207 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::RectU & fidl_rectangle)
static
Defined at line 215 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::wire::RectU & fidl_rectangle)
static
Defined at line 224 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const Point2 & origin, const Extent2 & extent)
static
Defined at line 233 of file ../../src/ui/scenic/lib/types/rectangle.h
void Rectangle (const Rectangle::ConstructorArgs & args)
Constructor that enables the designated initializer syntax.
NOLINTNEXTLINE(google-explicit-constructor)
Defined at line 191 of file ../../src/ui/scenic/lib/types/rectangle.h
void Rectangle ()
Empty rectangle. Allows usage as key in std C++ containers.
Defined at line 196 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::RectU ToFidlRectU ()
Conversion to FIDL types.
Defined at line 244 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::wire::RectU ToWireRectU ()
Defined at line 254 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::RectF ToFidlRectF ()
Defined at line 267 of file ../../src/ui/scenic/lib/types/rectangle.h
bool Contains (const Point2 & point)
Defined at line 273 of file ../../src/ui/scenic/lib/types/rectangle.h
Friends
bool Rectangle (const Rectangle & lhs, const Rectangle & rhs)
bool Rectangle (const Rectangle & lhsconst Rectangle & rhs)