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 58 of file ../../src/ui/scenic/lib/types/rectangle.h

void Rectangle (Rectangle && )

Defined at line 59 of file ../../src/ui/scenic/lib/types/rectangle.h

Rectangle & operator= (const Rectangle & )

Defined at line 60 of file ../../src/ui/scenic/lib/types/rectangle.h

Rectangle & operator= (Rectangle && )

Defined at line 61 of file ../../src/ui/scenic/lib/types/rectangle.h

void ~Rectangle ()

Defined at line 62 of file ../../src/ui/scenic/lib/types/rectangle.h

const Point2 & origin ()

Defined at line 72 of file ../../src/ui/scenic/lib/types/rectangle.h

const Extent2 & extent ()

Defined at line 73 of file ../../src/ui/scenic/lib/types/rectangle.h

Point2 opposite ()

The corner diagonally opposite from the origin.

Defined at line 75 of file ../../src/ui/scenic/lib/types/rectangle.h

int32_t x ()

Defined at line 77 of file ../../src/ui/scenic/lib/types/rectangle.h

int32_t y ()

Defined at line 78 of file ../../src/ui/scenic/lib/types/rectangle.h

int32_t width ()

Defined at line 79 of file ../../src/ui/scenic/lib/types/rectangle.h

int32_t height ()

Defined at line 80 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 103 of file ../../src/ui/scenic/lib/types/rectangle.h

bool IsValid (const fuchsia_math::Rect & rect, bool should_assert)

static

Defined at line 135 of file ../../src/ui/scenic/lib/types/rectangle.h

bool IsValid (const fuchsia_math::RectU & rect, bool should_assert)

static

Defined at line 142 of file ../../src/ui/scenic/lib/types/rectangle.h

bool IsValid (const fuchsia_math::wire::RectU & rect, bool should_assert)

static

Defined at line 159 of file ../../src/ui/scenic/lib/types/rectangle.h

bool IsValid (const Point2 & origin, const Extent2 & extent, bool should_assert)

static

Defined at line 176 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 190 of file ../../src/ui/scenic/lib/types/rectangle.h

Rectangle From (const fuchsia_math::RectU & fidl_rectangle)

static

Defined at line 198 of file ../../src/ui/scenic/lib/types/rectangle.h

Rectangle From (const fuchsia_math::wire::RectU & fidl_rectangle)

static

Defined at line 207 of file ../../src/ui/scenic/lib/types/rectangle.h

Rectangle From (const Point2 & origin, const Extent2 & extent)

static

Defined at line 216 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 182 of file ../../src/ui/scenic/lib/types/rectangle.h

void Rectangle ()

Empty rectangle. Allows usage as key in std C++ containers.

Defined at line 187 of file ../../src/ui/scenic/lib/types/rectangle.h

fuchsia_math::RectU ToFidlRectU ()

Conversion to FIDL types.

Defined at line 227 of file ../../src/ui/scenic/lib/types/rectangle.h

fuchsia_math::wire::RectU ToWireRectU ()

Defined at line 237 of file ../../src/ui/scenic/lib/types/rectangle.h

fuchsia_math::RectF ToFidlRectF ()

Defined at line 250 of file ../../src/ui/scenic/lib/types/rectangle.h

bool Contains (const Point2 & point)

Defined at line 256 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)