class RotatableExtent

Defined at line 245 of file fidling/gen/sdk/fidl/fuchsia.ui.observation.geometry/fuchsia.ui.observation.geometry/hlcpp/fuchsia/ui/observation/geometry/cpp/fidl.h

A view bounding box, described in another view's coordinate system.

Concretely, |RotatableExtent| describes the origin, size, and rotation angle

about the origin, for a view's bounding box.

Note: For describing a view's bounding box in the view's own coordinate

system, see |AlignedExtent|.

We use "V" to refer to the view being described, and "W" to refer to the

view where V is being described.

Note that while |angle| can be arbitrary, typical usage is axis aligned.

To find the bounding box of V in W in clockwise order, starting with

|origin|, where |angle| is 0, 90, 180, or 270, and using o=origin, w=width,

h=height, a=angle:

a= 0: (o.x, o.y), (o.x + w, o.y), (o.x + w, o.y + h), (o.x, o.y + h)

a= 90: (o.x, o.y), (o.x, o.y - w), (o.x + h, o.y - w), (o.x + h, o.y)

a=180: (o.x, o.y), (o.x - w, o.y), (o.x - w, o.y - h), (o.x, o.y - h)

a=270: (o.x, o.y), (o.x, o.y + w), (o.x - h, o.y + w), (o.x - h, o.y)

A formula based on sin a and cos a is readily obtained, but floating point

computation may give only approximate results.

Public Members

PointF origin
float width
float height
float angle_degrees

Public Methods

::std::unique_ptr<RotatableExtent> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, RotatableExtent * value, size_t _offset)
zx_status_t Clone (RotatableExtent * result)