hitTestInput method
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).
Implementation
@override
DisplayObject? hitTestInput(num localX, num localY) {
// We override the hitTestInput method for optimal performance.
if (bitmapData == null) return null;
if (localX < 0.0 || localX >= bitmapData!.width) return null;
if (localY < 0.0 || localY >= bitmapData!.height) return null;
return this;
}