API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.AlignAndDistribute method
Aligns and/or distributes the shape or shapes in the selection
Syntax:
Sub AlignAndDistribute(ByVal MethodH As cdrAlignDistributeH, ByVal MethodV As cdrAlignDistributeV, Optional ByVal AlignTo As cdrAlignShapesTo = cdrAlignShapesToLastSelected, Optional ByVal DistributeArea As cdrDistributeArea = cdrDistributeToSelection, Optional ByVal UseOutline As Boolean = False, Optional ByVal TextAlignOrigin As cdrTextAlignOrigin = cdrTextAlignBoundingBox, Optional ByVal PointX As Double = 0, Optional ByVal PointY As Double = 0, Optional ByVal DistributeRect As Rect = Nothing)
Parameters:
Name Type Description
MethodH
MethodV
AlignTo
Specifies whether to align objects to the center or edge of the page, the grid, the last selected object, or to a defined point
DistributeArea
Specifies the area over which to distribute objects
UseOutline
Boolean
Accounts for outline thickness when calculating object size and position
TextAlignOrigin
Specifies the origin for aligning text such as bounding box, first baseline, or last baseline
PointX
Double
Specifies the x-coordinate of the reference point for aligning and distributing
PointY
Double
Specifies the y-coordinate of the reference point for aligning and distributing
DistributeRect
Distributes objects within a specified rectangle
Remarks:
The AlignAndDistribute method aligns and/or distributes the shape or shapes in the selection.