org.apache.batik.dom.svg
Class AbstractSVGTransform
public abstract
class
AbstractSVGTransform
extends Object
implements SVGTransform
Abstract implementation of {@link SVGTransform}.
Field Summary |
protected AffineTransform | affineTransform
The transformation as a Java2D {link AffineTransform}. |
protected float | angle
The angle of the transformation, if this transformation is a rotation
or a skew. |
protected short | type
Type of the transformation. |
protected float | x
The x coordinate of the center of the rotation, if this transformation
is a rotation. |
protected float | y
The y coordinate of the center of the rotation, if this transformation
is a rotation. |
Method Summary |
void | assign(AbstractSVGTransform t)
Copies the value of the specified transformation into this object. |
protected abstract SVGMatrix | createMatrix()
Creates and returns a new {@link SVGMatrix} for exposing the
transformation as a matrix. |
float | getAngle()
DOM: Implements {@link SVGTransform#getAngle()}. |
SVGMatrix | getMatrix()
DOM: Implements {@link SVGTransform#getMatrix()}. |
short | getType()
DOM: Implements {@link SVGTransform#getType()}. |
float | getX()
Returns the x coordinate of the center of the rotation, if this
transformation is a rotation. |
float | getY()
Returns the y coordinate of the center of the rotation, if this
transformation is a rotation. |
void | setMatrix(SVGMatrix matrix)
DOM: Implements {@link SVGTransform#setMatrix(SVGMatrix)}. |
void | setRotate(float angle, float cx, float cy)
DOM: Implements {@link SVGTransform#setRotate(float,float,float)}. |
void | setScale(float sx, float sy)
DOM: Implements {@link SVGTransform#setScale(float,float)}. |
void | setSkewX(float angle)
DOM: Implements {@link SVGTransform#setSkewX(float)}. |
void | setSkewY(float angle)
DOM: Implements {@link SVGTransform#setSkewY(float)}. |
void | setTranslate(float tx, float ty)
DOM: Implements {@link SVGTransform#setTranslate(float,float)}. |
protected void | setType(short type)
Sets the type of transformation. |
protected AffineTransform affineTransform
The transformation as a Java2D {link AffineTransform}.
protected float angle
The angle of the transformation, if this transformation is a rotation
or a skew. This is stored to avoid extracting the angle from the
transformation matrix.
protected short type
Type of the transformation. Before any values are set, the type
is unknown.
protected float x
The x coordinate of the center of the rotation, if this transformation
is a rotation.
protected float y
The y coordinate of the center of the rotation, if this transformation
is a rotation.
Copies the value of the specified transformation into this object.
protected abstract SVGMatrix createMatrix()
Creates and returns a new {@link SVGMatrix} for exposing the
transformation as a matrix.
Returns: SVGMatrix representing the transformation
public float getAngle()
DOM: Implements {@link SVGTransform#getAngle()}.
public SVGMatrix getMatrix()
DOM: Implements {@link SVGTransform#getMatrix()}.
public short getType()
DOM: Implements {@link SVGTransform#getType()}.
public float getX()
Returns the x coordinate of the center of the rotation, if this
transformation is a rotation.
public float getY()
Returns the y coordinate of the center of the rotation, if this
transformation is a rotation.
public void setMatrix(SVGMatrix matrix)
DOM: Implements {@link SVGTransform#setMatrix(SVGMatrix)}.
public void setRotate(float angle, float cx, float cy)
DOM: Implements {@link SVGTransform#setRotate(float,float,float)}.
public void setScale(float sx, float sy)
DOM: Implements {@link SVGTransform#setScale(float,float)}.
public void setSkewX(float angle)
DOM: Implements {@link SVGTransform#setSkewX(float)}.
public void setSkewY(float angle)
DOM: Implements {@link SVGTransform#setSkewY(float)}.
public void setTranslate(float tx, float ty)
DOM: Implements {@link SVGTransform#setTranslate(float,float)}.
protected void setType(short type)
Sets the type of transformation.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.