See Also

TransparencyGroup Members  | ceTe.DynamicPDF.PageElements Namespace

Requirements

Namespace: ceTe.DynamicPDF.PageElements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

Language

Visual Basic

C#

Show All

Represents a group of page elements that will have transparency.

For a list of all members of this type, see TransparencyGroup members.

Object Model

Inheritance Hierarchy

System.Object
   ceTe.DynamicPDF.PageElement
      ceTe.DynamicPDF.PageElements.Group
         ceTe.DynamicPDF.PageElements.TransparencyGroup

Syntax

[Visual Basic]
Public Class TransparencyGroup    Inherits Group    Implements IPageElementContainer 
[C#]
public class TransparencyGroup : Group, IPageElementContainer 

Remarks

This class can be used to add transparency to page elements. Any page element that is placed in this group will be displayed with the transparency values and attributes of this group.

Example

The following example will display text with a transparent rectangle over it. The text will be visible beneath the rectangle.

[Visual Basic] 

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule

    Sub Main()

        ' Create a PDF Document
        Dim MyDocument As Document = New Document

        ' Create a Page and add it to the document
        Dim MyPage As Page = New Page
        MyDocument.Pages.Add(MyPage)

        ' Create a transparency group and add a rectangle to it
        Dim MyGroup As TransparencyGroup = New TransparencyGroup(0.5F)
        MyGroup.Add(New Rectangle(50, 0, 100, 100, RgbColor.Red, RgbColor.Red))

        ' Add a label to the page
        MyPage.Elements.Add(New Label("This text is beneath the rectangle.", _
             0, 0, 200, 12))

        'Add the transparency group to the page
        MyPage.Elements.Add(MyGroup)

        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")

    End Sub
End Module

[C#] 

using System; 
using ceTe.DynamicPDF; 
using ceTe.DynamicPDF.PageElements; 
 
class MyClass 

    static void Main() 
    { 
        // Create a PDF Document 
        Document document = new Document(); 
 
        // Create a Page and add it to the document 
        Page page = new Page(); 
        document.Pages.Add( page ); 
 
        // Create a transparency group and add a rectangle to it 
        TransparencyGroup group = new TransparencyGroup( 0.5f ); 
        group.Add( new Rectangle( 50, 0, 100, 100, RgbColor.Red, RgbColor.Red ) ); 
 
        // Add a label to the page 
        page.Elements.Add( new Label( "This text is beneath the rectangle.",  
            0, 0, 200, 12 ) ); 
 
        // Add the transparency group to the page 
        page.Elements.Add( group ); 
 
        // Save the PDF 
        document.Draw( @"C:\MyDocument.pdf" ); 
    } 
}

Licensing

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

Requirements

Namespace: ceTe.DynamicPDF.PageElements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: ceTe.DynamicPDF (in ceTe.DynamicPDF.dll)

See Also

TransparencyGroup Members  | ceTe.DynamicPDF.PageElements Namespace

 

 


© Copyright 2006, ceTe Software