org.apache.batik.ext.awt.g2d
Class TransformStackElement
java.lang.Object
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.
TransformStackElement
protected TransformStackElement(TransformType type,
double[] transformParameters)
- Parameters:
type
- transform typetransformParameters
- parameters for transform
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.