Previous Document Next Document
Shape.Weld

Function Weld(TargetShape As Shape, [LeaveSource As Boolean = False], [LeaveTarget As Boolean = False]) As Shape

Member of Shape

The Weld method welds shapes together.

Parameters
Description
TargetShape
Specifies the object that welds with the shape object
LeaveSource
Determines whether to keep the shape object after the weld is complete
This parameter is optional, and its default value is False.
LeaveTarget
Determines whether to keep the target object after the weld is complete
This parameter is optional, and its default value is False.

The following code example creates a circle and a square, and it then welds them together.

Sub Test() 
 Dim s1 As Shape, s2 As Shape 
 Dim s As Shape 
 Set s1 = ActiveLayer.CreateEllipse2(4, 5, 2) 
 Set s2 = ActiveLayer.CreateRectangle2(2, 1, 4, 4) 
 Set s = s1.Weld(s2) 
 s.Fill.UniformColor.CMYKAssign 100, 0, 0, 0 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.