Package playn.scene

Interface Layer.HitTester

Enclosing class:
Layer

public static interface Layer.HitTester
Used to customize a layer's hit testing mechanism.
  • Method Summary

    Modifier and Type
    Method
    Description
    hitTest(Layer layer, Point p)
    Returns layer, or a child of layer if the supplied coordinate (which is in layer's coordinate system) hits layer, or one of its children.
  • Method Details

    • hitTest

      Layer hitTest(Layer layer, Point p)
      Returns layer, or a child of layer if the supplied coordinate (which is in layer's coordinate system) hits layer, or one of its children. This allows a layer to customize the default hit testing approach, which is to simply check whether the point intersects a layer's bounds. See Layer.hitTest(pythagoras.f.Point).