Object Model Reference : Classes : S : Shape : Methods : Shape.Clone |
Function Clone([OffsetX As Double], [OffsetY As Double]) As Shape
Member of Shape
The Clone method clones a shape and returns a reference to that clone.
The following VBA example creates a red rectangle, clones it, and then changes the fill of the clone to green.
Sub Test() |
Dim rs As Shape, cs As Shape |
Set rs = ActiveLayer.CreateRectangle2(0, 0, 4, 2) |
rs.Fill.UniformColor.CMYKAssign 0, 100, 100, 0 |
Set cs = rs.Clone(0, 3) |
cs.Fill.UniformColor.CMYKAssign 100, 0, 100, 0 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.