Previous Document Next Document
Shape.Stretch

Sub Stretch(StretchX As Double, [StretchY As Double], [StretchCharactersSize As Boolean = False])

Member of Shape

The Stretch method stretches a shape relative to the reference point specified by the Document.ReferencePoint property.

Parameters
Description
StretchX
Specifies the distance to stretch the shape horizontally
StretchY
Specifies the distance to stretch the shape vertically. If this value is omitted, its value is assumed to be the same as the StretchX parameter value, resulting in a proportional stretch.
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 each shape on the current layer by 200%, relative to each shape’s center:

Sub Test() 
 Dim s As Shape 
 ActiveDocument.ReferencePoint = cdrCenter 
 For Each s In ActiveLayer.Shapes 
  s.CreateSelection 
  s.Stretch 2 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.