class Rectangle
Defined at line 34 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
FIDL type [`fuchsia.math/RectU`] representation useful for the display stack.
Also similar to the VkRect2D in the Vulkan API.
See `::fuchsia_math::wire::RectU` for references.
Instances represent rectangular axis-aligned regions inside raster images.
The display stack uses the Vulkan coordinate space. The origin is at the
image's top-left corner. The X axis points to the right, and the Y axis
points downwards.
Instances are guaranteed to represent regions of images whose dimensions are
supported by the display stack. See `Dimensions` for details on validity
guarantees.
This is a value type. Instances can be stored in containers. Copying, moving
and destruction are trivial.
Public Methods
void Rectangle (const Rectangle & )
Defined at line 56 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
void Rectangle (Rectangle && )
Defined at line 57 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
Rectangle & operator= (const Rectangle & )
Defined at line 58 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
Rectangle & operator= (Rectangle && )
Defined at line 59 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
void ~Rectangle ()
Defined at line 60 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
int32_t x ()
Guaranteed to be in [0, `Dimensions::kMaxWidth`].
Defined at line 68 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
int32_t y ()
Guaranteed to be in [0, `Dimensions::kMaxHeight`].
Defined at line 71 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
const Dimensions & dimensions ()
Defined at line 73 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
int32_t width ()
Defined at line 75 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
int32_t height ()
Defined at line 76 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
bool IsValid (const fuchsia_math::wire::RectU & fidl_rectangle)
True iff `fidl_rectangle` is convertible to a valid Rectangle.
Defined at line 98 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
Rectangle From (const fuchsia_math::wire::RectU & fidl_rectangle)
`fidl_rectangle` must be convertible to a valid Rectangle.
This is not a constructor to allow designated initializer syntax. Making
this a constructor would introduce ambiguity when designated initializer
syntax is used, because `fuchsia.math/RectU` has the same field names as
our supported designated initializer syntax.
Defined at line 133 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
void Rectangle (const Rectangle::ConstructorArgs & args)
Constructor that enables the designated initializer syntax.
NOLINTNEXTLINE(google-explicit-constructor)
Defined at line 127 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
fuchsia_math::wire::RectU ToFidl ()
Defined at line 149 of file ../../src/graphics/display/lib/api-types/cpp/rectangle.h
Friends
bool Rectangle (const Rectangle & lhs, const Rectangle & rhs)
bool Rectangle (const Rectangle & lhsconst Rectangle & rhs)