class Viewport

Defined at line 421 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

A rectangular region that directs injected events into a target.

The viewport relates a pointer's position across multiple independent

coordinate systems: the context, the viewport, and the dispatch clients.

Intuitively, the viewport is how a pointer's position is mapped to an

interactive part of the scene.

A matrix is used to relate the viewport coordinate system to the context

coordinate system. A pair of extents defines the viewport's size in the

viewport coordinate system. Together, they define the viewport's placement

in the context coordinate system.

The viewport coordinate system is used to convey a pointer's coordinates in

a scale-invariant way to dispatch clients, so that pointer movement can be

interpreted correctly under effects like magnification. The context defines

the viewport's minimal and maximal extents in the viewport coordinate

system.

- The boundary of the viewport, a rectangle, is axis aligned with the

viewport coordinate system; however it may otherwise be freely positioned

("float") within it: there is translation and scaling, but no rotation.

- Floating gives the injector some choice in how to convey coordinates, such

as in Vulkan NDC, or in display pixel coordinates.

- The viewport rectangle defines a latch region used in dispatch (described

below).

A dispatch client receives a pointer's coordinates in the viewport

coordinate system, along with a matrix to convert coordinates from the

viewport coordinate system to the dispatch client's coordinate system.

All fields required.

TODO(https://fxbug.dev/42162296): Rename Viewport, it is used in Flatland.

Public Members

static const fidl_type_t * FidlType

Public Methods

bool IsEmpty ()

Returns whether no field is set.

const ::std::array< ::std::array<float, 2>, 2> & extents ()

The viewport's minimal and maximal extents in the viewport coordinate

system.

Defined at line 429 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

bool has_extents ()

Defined at line 433 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

::std::array< ::std::array<float, 2>, 2> * mutable_extents ()

The viewport's minimal and maximal extents in the viewport coordinate

system.

Defined at line 439 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

void clear_extents ()

Defined at line 447 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

Viewport & set_extents (::std::array< ::std::array<float, 2>, 2> _value)
const ::std::array<float, 9> & viewport_to_context_transform ()

A transformation matrix that describes how to map the viewport

coordinate system to the context coordinate system.

This transform, together with |extents|, defines the viewport's

placement in the context coordinate system.

This transform must be an invertible matrix (i.e., has a non-zero

determinant), which guarantees it describes a bijection between the

viewport coordinate system and the context coordinate system. A

non-invertible matrix is rejected.

Defined at line 465 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

bool has_viewport_to_context_transform ()

Defined at line 469 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

::std::array<float, 9> * mutable_viewport_to_context_transform ()

A transformation matrix that describes how to map the viewport

coordinate system to the context coordinate system.

This transform, together with |extents|, defines the viewport's

placement in the context coordinate system.

This transform must be an invertible matrix (i.e., has a non-zero

determinant), which guarantees it describes a bijection between the

viewport coordinate system and the context coordinate system. A

non-invertible matrix is rejected.

Defined at line 483 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

void clear_viewport_to_context_transform ()

Defined at line 491 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/hlcpp/fuchsia/ui/pointerinjector/cpp/fidl.h

Viewport & set_viewport_to_context_transform (::std::array<float, 9> _value)
void Viewport ()
void Viewport (Viewport && other)
void ~Viewport ()
Viewport & operator= (Viewport && other)
::std::unique_ptr<Viewport> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, Viewport * _value, size_t _offset)
zx_status_t Clone (Viewport * _result)