org.jfree.report.content
Class ShapeTransform

java.lang.Object
  extended byorg.jfree.report.content.ShapeTransform

public final class ShapeTransform
extends java.lang.Object

Utility class, which resizes a Shape.

Author:
Thomas Morgner

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
 

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