Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.SetSize |
Sub SetSize([Width As Double], [Height As Double])
Member of ShapeRange
The SetSize method sets the size of the shapes in a shape range, treating the range as a single object.
• |
The reference point around which to stretch the range is specified by the
Document.ReferencePoint property.
|
• |
See also the ShapeRange.SizeWidth and ShapeRange.SizeHeight properties, as
well as the ShapeRange.GetBoundingBox and ShapeRange.SetBoundingBox
methods.
|
The following VBA example stretches all the shapes on the active layer so that the vertical size of each shape is 1.
Sub Test() |
Dim x As Double, y As Double |
Dim sr As ShapeRange |
Set sr = ActiveLayer.Shapes.All |
If sr.Count > 0 Then |
ActiveDocument.ReferencePoint = cdrCenter |
sr.GetPosition x, y |
sr.SetSize x, 1 |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.