transformed method

  1. @override
PointerCancelEvent transformed (Matrix4 transform)
override

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 transform. A null value for transform is treated as the identity transformation.

The method may return the same object instance if for example the transformation has no effect on the event.

Transforms are not commutative. If this method is called on a PointerEvent that has a non-null transform value, that value will be overridden by the provided transform.

Implementation

@override
PointerCancelEvent transformed(Matrix4 transform) {
  if (transform == null || transform == this.transform) {
    return this;
  }
  return PointerCancelEvent(
    timeStamp: timeStamp,
    pointer: pointer,
    kind: kind,
    device: device,
    position: position,
    localPosition: PointerEvent.transformPosition(transform, position),
    buttons: buttons,
    obscured: obscured,
    pressureMin: pressureMin,
    pressureMax: pressureMax,
    distance: distance,
    distanceMax: distanceMax,
    size: size,
    radiusMajor: radiusMajor,
    radiusMinor: radiusMinor,
    radiusMin: radiusMin,
    radiusMax: radiusMax,
    orientation: orientation,
    tilt: tilt,
    transform: transform,
    original: original ?? this,
  );
}