Skip to main content
Version: Next

getRegionCenter

Callable


  • Returns the logical center of a region given its control points.

    • Line / vector / ruler types: midpoint of the two endpoints.
    • Polygon / polyline types: center of the axis-aligned bounding box.
    • All other types: the first control point (which is the stored center).

    Parameters

    • points: Point2D[]

      Control points of the region in image pixel coordinates.

    • regionType: RegionType

      The type of the region.

    Returns Point2D

    The center point of the region.