Previous Document Next Document
ShapeRange.Combine

Function Combine() As Shape

Member of ShapeRange

The Combine method combines all of the shapes in the range into a single curve.

The following code example creates a single shape by combining a set of circles:

Sub Test() 
 Const Num As Long = 15 
 Dim sr As New ShapeRange 
 Dim s As Shape, n As Long 
 Set s = ActiveLayer.CreateEllipse2(4, 4, 1) 
 s.SetRotationCenter 4, 5 
 For n = 1 To Num - 1 
  sr.Add s.Duplicate 
  s.Rotate 360 / Num 
 Next n 
 sr.Add s 
 Set s = sr.Combine 
 s.Fill.UniformColor.RGBAssign 255, 0, 0 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.