API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.StretchEx method
Stretches the shape by using the anchor point
Syntax:
Sub StretchEx(ByVal CenterX As Double, ByVal CenterY As Double, ByVal StretchX As Double, Optional ByVal StretchY As Double = 0, Optional ByVal StretchCharactersSize As Boolean = False)
Parameters:
Name Type Description
CenterX
Double
CenterY
Double
StretchX
Double
StretchY
Double
Specifies the vertical stretch factor. If this value is omitted, it is assumed to be the same as the StretchX parameter value, resulting in a proportional stretch.
StretchCharactersSize
Boolean
Specifies whether characters are stretched with the shape.
Remarks:
The StretchEx method stretches a shape to a specified width and height, relative to the coordinates specified as the center of distortion.
Examples:
The following VBA example stretches all shapes on the page by 200%, using the center of the page as the center of the distortion.
Sub Test()
ActiveDocument.ReferencePoint = cdrBottomLeft
With ActivePage
  .Shapes.All.StretchEx .CenterX, .CenterY, 2
End With 
End Sub