Previous Document Next Document
Shape.Effects

Property Effects As Effects

Member of Shape

The Effects property returns a collection of all Effects applied to a shape.

The Effects property returns a read-only value.

The following code example creates three ellipses and two blends between them. One ellipse, referenced by the s2 variable, is part of both blends. The Effects collection is then applied to that ellipse, to access both blends and adjust their spacing-acceleration properties.

Sub Test() 
 Dim doc As Document 
 Dim s1 As Shape, s2 As Shape, s3 As Shape 
 Dim e As Effect 
 Set doc = CreateDocument 
 Set s1 = doc.ActiveLayer.CreateEllipse(0, 0, 2, 2) 
 s1.Fill.UniformColor.RGBAssign 255, 0, 0 
 Set s2 = doc.ActiveLayer.CreateEllipse(4, 4, 5, 5) 
 s2.Fill.UniformColor.RGBAssign 0, 0, 255 
 Set s3 = doc.ActiveLayer.CreateEllipse(0, 7, 1, 8) 
 s3.Fill.UniformColor.RGBAssign 0, 255, 0 
 s2.CreateBlend s1 
 s2.CreateBlend s3 
 For Each e In s2.Effects 
  e.Blend.SpacingAcceleration = -100 
 Next e 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.