globalToLocal method

  1. @override
Offset globalToLocal (
  1. Offset point

Convert the given point from the global coordinate system (as used by pointer events from the device) to the coordinate system used by the tests (an 800 by 600 window).


Offset globalToLocal(Offset point) {
  final Matrix4 transform = renderView.configuration.toHitTestMatrix();
  final double det = transform.invert();
  assert(det != 0.0);
  final Offset result = MatrixUtils.transformPoint(transform, point);
  return result;