Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.Clone


ShapeRange.Clone

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

Description

Member of ShapeRange

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

Parameter
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.

VBA example

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