Represents a group of page elements that will have transparency.

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


System.Object
   ceTe.DynamicPDF.PageElement
      ceTe.DynamicPDF.PageElements.Group
public class TransparencyGroup : Group , IEnumerable
, 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, Color.Red, Apply.Fill))

        ' 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, Color.Red, Apply.Fill ) );

        // 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" );
    }
}

Requirements

Namespace: ceTe.DynamicPDF.PageElements Namespace

Assembly: DynamicPDF.Generator.[Edition].dll

See Also

TransparencyGroup members | ceTe.DynamicPDF.PageElements Namespace