com.cete.dynamicpdf.pageelements
Class TransformationGroup


Example: The following example will display an image and some text that has been rotated and horizontally scaled as a group.

import com.cete.dynamicpdf.*;
import com.cete.dynamicpdf.pageelements.*;
 
public class MyClass{
       public static void main(String args[]){
 
           // Create a PDF Document
           Document document = new Document();
 
           // Create a Page and add it to the document
           Page page = new Page();
           document.getPages().add(page);
 
           // Create a transformation group and add a rectangle and label to it
           TransformationGroup group = new TransformationGroup( 100, 100, 200, 200, 30 );
 
           group.add(new Rectangle(0, 0, 75, 75, RgbColor.getBlue(), RgbColor.getBlue()));
           group.add(new Label("This text is inside a TransformationGroup.", 
           0, 100, 300, 12));
 
           // Vertically scale the group
           group.setScaleY(2);
 
           // Add the transformation group to the page
           page.getElements().add(group);
 
           document.draw("[Physicalpath]/MyDocument.pdf");
       }
 }