selectShapesAtPoint method

  1. @override
List<GShape> selectShapesAtPoint(
  1. Point p, {
  2. bool recursive = false,
})
override

Implementation

@override
List<GShape> selectShapesAtPoint(Point p, {bool recursive = false}) {
  final shapeBoundingBox = this.shapeBoundingBox;
  if (shapeBoundingBox.containsPoint(p)) {
    if (recursive) {
      final p2 = p.decrement(shapeBoundingBox);
      var subShapes =
          shapes.selectShapesAtPoint(p2, recursive: true, growable: false);
      return [this, ...subShapes];
    } else {
      return [this];
    }
  } else {
    return [];
  }
}