com.jrefinery.report.targets
Class ShapeTransform

java.lang.Object
  extended bycom.jrefinery.report.targets.ShapeTransform

public class ShapeTransform
extends java.lang.Object

Utility class, which resizes a Shape.

Author:
Thomas Morgner

Constructor Summary
ShapeTransform()
           
 
Method Summary
static java.awt.Shape transformShape(java.awt.Shape s, boolean scale, boolean keepAR, java.awt.geom.Dimension2D dim)
          Translates the given shape.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapeTransform

public ShapeTransform()
Method Detail

transformShape

public static java.awt.Shape transformShape(java.awt.Shape s,
                                            boolean scale,
                                            boolean keepAR,
                                            java.awt.geom.Dimension2D dim)
Translates the given shape. The shape is translated to the origin supplied in point. If scaling is requested, the shape will also be scaled using an AffineTransform.

Parameters:
s - the shape that should be transformed
scale - true, if the shape should be scaled, false otherwise
keepAR - true, if the scaled shape should keep the aspect ratio
dim - the target dimension.
Returns:
the transformed shape