Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.Duplicate


Shape.Duplicate

Function Duplicate([OffsetX As Double], [OffsetY As Double]) As Shape

Description

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.

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

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.