Previous Document Next Document
ShapeRange.Clone

Function Clone([OffsetX As Double], [OffsetY As Double]) As ShapeRange

Member of ShapeRange

The Clone method clones each shape in a range and returns a new shape range containing all of the clones.

Parameters
Description
OffsetX
Specifies the horizontal distance to offset the cloned shape range
This parameter is optional, and its default value is 0.
OffsetY
Specifies the vertical distance to offset the cloned shape range
This parameter is optional, and its default value is 0.

The following code example creates two rectangles and clones them:

Sub Test() 
 Dim sr As New ShapeRange 
 Dim srClone As ShapeRange 
 sr.Add ActiveLayer.CreateRectangle(0, 0, 1, 1) 
 sr.Add ActiveLayer.CreateRectangle(2, 0, 3, 1) 
 sr.ApplyUniformFill CreateRGBColor(255, 0, 0) 
 Set srClone = sr.Clone(0, 2) 
 sr.ApplyUniformFill CreateRGBColor(0, 0, 255) 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.