Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.Stretch


Shape.Stretch

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

Description

Member of Shape

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

Parameter
Description
StretchX
Specifies the distance to stretch the shape horizontally
StretchY
Specifies the distance to stretch the shape vertically. If this value is omitted, it 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.

VBA example

The following VBA example stretches each shape on the current layer by 200%, relative to the center of each shape.

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 2013 Corel Corporation. All rights reserved.