Previous Document Next Document
Shape.StretchEx

Sub StretchEx(CenterX As Double, CenterY As Double, StretchX As Double, [StretchY As Double], [StretchCharactersSize As Boolean = False])

Member of Shape

The StretchEx method stretches a shape to the specified width and height, relative to the coordinates specified as the center of distortion. The vertical stretch factor (the StretchY parameter) can be omitted; in this case, CorelDRAW uses the value of the horizontal stretch factor as the value of the vertical stretch factor, resulting in a proportional stretch.

Parameters
Description
CenterX
Defines the x-coordinate of the center of distortion
CenterY
Sets the y-coordinate of the center of distortion
StretchX
Defines the horizontal stretch factor
StretchY
Defines the vertical stretch factor
This parameter is optional, and its default value is 0.
StretchCharactersSize
Specifies whether characters are stretched with the shape
This parameter is optional, and its default value is False.

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.