1. override
DisplayObject hitTestInput(num localX, num localY)

Evaluates this display object to see if the coordinates localX and localY are inside this display object.

If the coordinates are inside, this display object is returned; null otherwise.

localX and localY are relative to to the origin (0,0) of this display object (local coordinates).

Source

@override
DisplayObject hitTestInput(num localX, num localY) {

  if (this.hitTestState == null) return null;

  Matrix matrix = hitTestState.transformationMatrix;

  num deltaX = localX - matrix.tx;
  num deltaY = localY - matrix.ty;
  num childX = (matrix.d * deltaX - matrix.c * deltaY) / matrix.det;
  num childY = (matrix.a * deltaY - matrix.b * deltaX) / matrix.det;

  return hitTestState.hitTestInput(childX, childY) != null ? this : null;
}