CoordinateTransform class abstract

Interface to be implemented by components that perform a coordinate change.

Any Component that does any coordinate transformation of the canvas during rendering should consider implementing this interface in order to describe how the points from the parent's coordinate system relate to the component's local coordinate system.

This interface assumes that the component performs a "uniform" coordinate transformation, that is, the transform applies to all children of the component equally. If that is not the case (for example, the component does different transformations for some of its children), then that component must implement Component.componentsAtLocation method instead.

The two methods of this interface convert between the parent's coordinate space and the local coordinates. The methods may also return null, indicating that the given cannot be mapped to any local/parent point.

Implementers

Constructors

CoordinateTransform()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

localToParent(Vector2 point) Vector2?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parentToLocal(Vector2 point) Vector2?
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited