getBoundingBox method

BoundingBoxAttachment? getBoundingBox(
  1. Polygon? polygon
)

Returns the bounding box for the given polygon or null. Requires a call to update() first.

Implementation

BoundingBoxAttachment? getBoundingBox(Polygon? polygon) {
  final result = SpineBindings.bindings
      .spine_skeleton_bounds_get_bounding_box(_ptr, polygon?.nativePtr.cast() ?? Pointer.fromAddress(0));
  return result.address == 0 ? null : BoundingBoxAttachment.fromPointer(result);
}