org.apache.batik.ext.awt.g2d
Class TransformStackElement

java.lang.Object
  extended by org.apache.batik.ext.awt.g2d.TransformStackElement
All Implemented Interfaces:
Cloneable

public abstract class TransformStackElement
extends Object
implements Cloneable

Contains a description of an elementary transform stack element, such as a rotate or translate. A transform stack element has a type and a value, which is an array of double values.


Constructor Summary
protected TransformStackElement(TransformType type, double[] transformParameters)
           
 
Method Summary
 Object clone()
           
 boolean concatenate(TransformStackElement stackElement)
           
static TransformStackElement createGeneralTransformElement(AffineTransform txf)
           
static TransformStackElement createRotateElement(double theta)
           
static TransformStackElement createScaleElement(double scaleX, double scaleY)
           
static TransformStackElement createShearElement(double shearX, double shearY)
           
static TransformStackElement createTranslateElement(double tx, double ty)
           
 double[] getTransformParameters()
           
 TransformType getType()
           
 boolean isIdentity()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformStackElement

protected TransformStackElement(TransformType type,
                                double[] transformParameters)
Parameters:
type - transform type
transformParameters - parameters for transform
Method Detail

clone

public Object clone()
Overrides:
clone in class Object
Returns:
an object which is a deep copy of this one

createTranslateElement

public static TransformStackElement createTranslateElement(double tx,
                                                           double ty)

createRotateElement

public static TransformStackElement createRotateElement(double theta)

createScaleElement

public static TransformStackElement createScaleElement(double scaleX,
                                                       double scaleY)

createShearElement

public static TransformStackElement createShearElement(double shearX,
                                                       double shearY)

createGeneralTransformElement

public static TransformStackElement createGeneralTransformElement(AffineTransform txf)

isIdentity

public boolean isIdentity()
Returns:
true iff this transform is the identity transform

getTransformParameters

public double[] getTransformParameters()
Returns:
array of values containing this transform element's parameters

getType

public TransformType getType()
Returns:
this transform type

concatenate

public boolean concatenate(TransformStackElement stackElement)


Copyright © 2008 Apache Software Foundation. All Rights Reserved.