Previous Document Next Document
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. The Duplicate method returns a Shape object for the duplicated shape.

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

The following code 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 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.