Object Model Reference : Classes : S : Shape : Methods : Shape.Duplicate |
Function Duplicate([OffsetX As Double], [OffsetY As Double]) As Shape
Member of Shape
The Duplicate method duplicates a shape and places the duplicate at the specified offset relative to the original shape position, returning a Shape object for the duplicated shape.
The following VBA example creates an ellipse, duplicates it, and creates a blend between the two shapes.
Sub Test() |
Dim s1 As Shape, s2 As Shape |
Set s1 = ActiveLayer.CreateEllipse(2, 7, 4, 5) |
Set s2 = s1.Duplicate(3, -5) |
s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0 |
s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0 |
s2.CreateBlend s1 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.