jPod PDF library

de.intarsys.pdf.tools.kernel
Class PDFGeometryTools

java.lang.Object
  extended by de.intarsys.pdf.tools.kernel.PDFGeometryTools

public class PDFGeometryTools
extends Object

Tool class for calculations regarding the PDF geometry.


Method Summary
static void adjustTransform(AffineTransform transform, int rotate, Rectangle2D rect)
          Given a device space transformation, apply the necessary transformation steps to move the origin of the coordinate system to the lower left corner of rect after rotating it clockwise by rotate.
static void adjustTransform(AffineTransform transform, PDPage page)
          Given a device space transformation, apply the necessary transformation steps to move the origin of the coordinate system to the lower left corner of page.
static int normalizeRotate(int rotation)
          Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.
static CDSRectangle transform(CDSMatrix matrix, CDSRectangle rect)
          Create the transformation of rect and return it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

adjustTransform

public static void adjustTransform(AffineTransform transform,
                                   int rotate,
                                   Rectangle2D rect)
Given a device space transformation, apply the necessary transformation steps to move the origin of the coordinate system to the lower left corner of rect after rotating it clockwise by rotate.

transform is modified

Parameters:
transform -
rotate -
rect -

adjustTransform

public static void adjustTransform(AffineTransform transform,
                                   PDPage page)
Given a device space transformation, apply the necessary transformation steps to move the origin of the coordinate system to the lower left corner of page.

transform is modified

Parameters:
transform -
page -

normalizeRotate

public static int normalizeRotate(int rotation)
Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.

Parameters:
rotation -
Returns:
Normalize the rotation parameter to a positive multiple of 90 between 0 and 270.

transform

public static CDSRectangle transform(CDSMatrix matrix,
                                     CDSRectangle rect)
Create the transformation of rect and return it.

Parameters:
matrix - The transformation to apply.
rect - The rectangle to be transformed. This is not changed.
Returns:
The transformed rectangle

jPod PDF library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.