Previous Document Next Document
Shape.Transparency

Property Transparency As Transparency

Member of Shape

The Transparency property returns a Transparency object that represents the transparency settings for the active shape.

The Transparency property returns a read-only value.

The following code example applies a 40% uniform transparency to all rectangles and a fountain transparency to all ellipses on a page:

Sub Test() 
 Dim s As Shape 
 For Each s In ActivePage.Shapes 
  Select Case s.Type 
   Case cdrRectangleShape 
    s.Transparency.ApplyUniformTransparency 40 
    ' Working around the ApplyUnifromTransparency method 
    If s.Transparency.Uniform <> 40 Then 
     s.Transparency.Uniform = 40 
    End If 
   Case cdrEllipseShape 
    s.Transparency.ApplyFountainTransparency Angle:=45 
   Case Else 
    If s.Transparency.Type <> cdrNoTransparency Then 
     s.Transparency.ApplyNoTransparency 
    End If 
  End Select 
 Next s 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.