Previous Document Next Document
Shape.Separate

Sub Separate()

Member of Shape

The Separate method separates effect shapes (that is, combined shapes or linked groups, such as blend groups, drop shadows, and so on).

This method is provided for compatibility reasons. The suggested method is Effect.Separate.

The following code example creates a blend between two ellipses and separates it:

Sub Test() 
 Dim s1 As Shape, s2 As Shape 
 Set s1 = ActiveLayer.CreateEllipse(0, 10, 2, 8) 
 Set s2 = s1.Duplicate(5, -7) 
 s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0 
 s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0 
 s2.CreateBlend(s1).Blend.BlendGroup.CreateSelection 
 s2.Selected = True 
 s1.Selected = True 
 ActiveSelection.Separate 
End Sub 

The following code example performs the same procedure as the previous example but using the Effect.Separate method:

Sub Test()

 Dim s1 As Shape, s2 As Shape

 Set s1 = ActiveLayer.CreateEllipse(0, 10, 2, 8)

 Set s2 = s1.Duplicate(5, -7)

 s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0

 s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0

 s2.CreateBlend(s1).Separate

End Sub

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.