class Viewport

Defined at line 136 of file fidling/gen/sdk/fidl/fuchsia.ui.pointerinjector/fuchsia.ui.pointerinjector/cpp/fidl/fuchsia.ui.pointerinjector/cpp/wire_types.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 Methods

bool IsEmpty ()

Returns whether no field is set.

bool HasUnknownData ()

Returns whether the table references unknown fields.

::fidl::WireTableBuilder< ::fuchsia_ui_pointerinjector::wire::Viewport> Builder (::fidl::AnyArena & arena)

Return a builder that by defaults allocates of an arena.

::fidl::WireTableExternalBuilder< ::fuchsia_ui_pointerinjector::wire::Viewport> ExternalBuilder (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_ui_pointerinjector::wire::Viewport>> frame)

Return a builder that relies on explicitly allocating |fidl::ObjectView|s.

void Viewport ()

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

void Viewport (const Viewport & other)

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

Viewport & operator= (const Viewport & other)

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

void Viewport (Viewport && other)

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

::fidl::Array< ::fidl::Array<float, 2>, 2> & extents ()

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

system.

bool has_extents ()
Viewport & operator= (Viewport && other)

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

::fidl::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.

bool has_viewport_to_context_transform ()
void ~Viewport ()

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

Friends

class WireTableBaseBuilder
class WireTableBaseBuilder