transformed method Null safety
- Matrix4? transform
Transforms the event from the global coordinate space into the coordinate space of an event receiver.
The coordinate space of the event receiver is described by
null value for
transform is treated as the identity transformation.
The resulting event will store the base event as original, delegates
most properties to original, except for localPosition and localDelta,
which are calculated based on
transform on first use and cached.
The method may return the same object instance if for example the transformation has no effect on the event. Otherwise, the resulting event will be a subclass of, but not exactly, the original event class (e.g. PointerDownEvent.transformed may return a subclass of PointerDownEvent).
Transforms are not commutative, and are based on original events.
If this method is called on a transformed event, the provided
will override (instead of multiplied onto) the existing
used to calculate the new localPosition and localDelta.
PointerEvent transformed(Matrix4? transform);