TransformationGroup

Represents a group of page elements to transform.

public class TransformationGroup : Group, IArea, ICoordinate, IEnumerable, IPageElementContainer, ISerializable
Public Class TransformationGroup
    Inherits Group
    Implements IArea, ICoordinate, IEnumerable, IPageElementContainer, ISerializable

Inheritance: ObjectPageElementGroupTransformationGroup

Implements: IArea, ICoordinate, IEnumerable, IPageElementContainer, ISerializable

Licensing Info

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples

The following example will display an image and some text that has been rotated and horizontally scaled as a group.
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 transformation group and add a rectangle and a label to it
        Dim MyGroup As TransformationGroup = New TransformationGroup(100, 100,200, 200, 30)
        MyGroup.Add(New Rectangle(0, 0, 75, 75, RgbColor.Blue, RgbColor.Blue))
        MyGroup.Add(New Label("This text is inside a TransformationGroup.", 0,100, 300, 12))
     
        ' Vertically scale the group
        MyGroup.ScaleY = 2
     
        ' Add the transformation group to the page
        MyPage.Elements.Add(MyGroup)
     
        ' Save the PDF
        MyDocument.Draw("C:\MyDocument.pdf")
     		
    End Sub
End Module	
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
     public static void CreatePDF(string outputPath)
    {
        // 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 transformation group and add a rectangle and label to it
        TransformationGroup group1 = new TransformationGroup(100, 100, 200, 200, 30);
        group1.Add(new Rectangle(0, 0, 75, 75, RgbColor.Blue, RgbColor.Blue));
        group1.Add(new Label("This text is inside a TransformationGroup.", 0, 100, 300, 12));

        // Vertically scale the group
        group1.ScaleY = 2;

        // Add the transformation group to the page
        page.Elements.Add(group1);

        document.Draw(outputPath);
    } 
}

Remarks

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

Constructors

TransformationGroup(Single, Single, Single, Single)Initializes a new instance of the TransformationGroup class.
TransformationGroup(Single, Single, Single, Single, Single)Initializes a new instance of the TransformationGroup class.

Properties

AngleGets or sets the Angle of the transformation group.
CountGets the number of page elements in the group.
(Inherited from Group)
HeightGets or sets the height of the transformation group.
IDGets or sets the ID of the page element.
(Inherited from PageElement)
IgnoreMarginsGets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property.
(Inherited from PageElement)
Item[Int32]Gets the PageElement object at the given index.
(Inherited from Group)
Item[String]Gets the PageElement object with the given ID.
(Inherited from Group)
RelativeToGets and sets placement of the page element on the page.
(Inherited from PageElement)
ScaleXGets or sets the X scale of the transformation group.
ScaleYGets or sets the Y scale of the transformation group.
WidthGets or sets the width of the transformation group.
XGets or sets the X coordinate of the transformation group.
YGets or sets the Y coordinate of the transformation group.

Methods

Add(PageElement)Adds a page element to the group.
(Inherited from Group)
Draw(PageWriter)Draws the transformation group to the given PageWriter object.
Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetEnumerator()Returns an enumerator that can iterate through the Group .
(Inherited from Group)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetPageElementByID(String)Returns a page element with the given ID.
(Inherited from Group)
GetType()Gets the Type of the current instance.
(Inherited from Object)
Insert(Int32, PageElement)Inserts a page element to the group.
(Inherited from Group)
ToString()Returns a String that represents the current Object .
(Inherited from Object)

See Also

ceTe.DynamicPDF.PageElements

In this topic