Previous Document Next Document

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


Shape.StretchEx

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

Description

Member of Shape

The StretchEx method stretches a shape to a specified width and height, relative to the coordinates specified as the center of distortion.

Parameter
Description
CenterX
Specifies the x-coordinate of the center of distortion
CenterY
Specifies the y-coordinate of the center of distortion
StretchX
Specifies the horizontal stretch factor
StretchY
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. 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 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 2013 Corel Corporation. All rights reserved.