class Rectangle
Defined at line 19 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 56 of file ../../src/ui/scenic/lib/types/rectangle.h
void Rectangle (Rectangle && )
Defined at line 57 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle & operator= (const Rectangle & )
Defined at line 58 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle & operator= (Rectangle && )
Defined at line 59 of file ../../src/ui/scenic/lib/types/rectangle.h
void ~Rectangle ()
Defined at line 60 of file ../../src/ui/scenic/lib/types/rectangle.h
const Point2 & origin ()
Defined at line 70 of file ../../src/ui/scenic/lib/types/rectangle.h
const Extent2 & extent ()
Defined at line 71 of file ../../src/ui/scenic/lib/types/rectangle.h
Point2 opposite ()
The corner diagonally opposite from the origin.
Defined at line 73 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t x ()
Defined at line 75 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t y ()
Defined at line 76 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t width ()
Defined at line 77 of file ../../src/ui/scenic/lib/types/rectangle.h
int32_t height ()
Defined at line 78 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 101 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::Rect & rect, bool should_assert)
static
Defined at line 133 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::RectU & rect, bool should_assert)
static
Defined at line 140 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const fuchsia_math::wire::RectU & rect, bool should_assert)
static
Defined at line 157 of file ../../src/ui/scenic/lib/types/rectangle.h
bool IsValid (const Point2 & origin, const Extent2 & extent, bool should_assert)
static
Defined at line 174 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 188 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::RectU & fidl_rectangle)
static
Defined at line 196 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const fuchsia_math::wire::RectU & fidl_rectangle)
static
Defined at line 205 of file ../../src/ui/scenic/lib/types/rectangle.h
Rectangle From (const Point2 & origin, const Extent2 & extent)
static
Defined at line 214 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 180 of file ../../src/ui/scenic/lib/types/rectangle.h
void Rectangle ()
Empty rectangle. Allows usage as key in std C++ containers.
Defined at line 185 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::RectU ToFidlRectU ()
Conversion to FIDL types.
Defined at line 225 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::wire::RectU ToWireRectU ()
Defined at line 235 of file ../../src/ui/scenic/lib/types/rectangle.h
fuchsia_math::RectF ToFidlRectF ()
Defined at line 248 of file ../../src/ui/scenic/lib/types/rectangle.h
bool Contains (const Point2 & point)
Defined at line 254 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)