Skip to main content
Version: Next

translateRegionPoints

Callable


  • Returns translated control points for a region without mutating the input.

    Center-based regions move only their center control point and preserve size or offset control points. Line-like and polygonal regions move every control point by the supplied delta.


    Parameters

    • points: Point2D[]

      Region control points in image pixel coordinates.

    • regionType: RegionType

      Type of the region represented by the control points.

    • delta: Point2D

      Image-pixel translation to apply.

    Returns Point2D[]

    A new control point array translated according to the region type.