org.apache.batik.dom.svg
Class AbstractSVGTransform

java.lang.Object
  extended by org.apache.batik.dom.svg.AbstractSVGTransform
Direct Known Subclasses:
AbstractSVGTransformList.SVGTransformItem, SVGOMTransform

public abstract class AbstractSVGTransform
extends java.lang.Object

Abstract implementation of SVGTransform.


Field Summary
protected  java.awt.geom.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.
 
Constructor Summary
AbstractSVGTransform()
           
 
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 SVGMatrix for exposing the transformation as a matrix.
 float getAngle()
          DOM: Implements SVGTransform#getAngle().
 SVGMatrix getMatrix()
          DOM: Implements SVGTransform#getMatrix().
 short getType()
          DOM: Implements 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 SVGTransform#setMatrix(SVGMatrix).
 void setRotate(float angle, float cx, float cy)
          DOM: Implements SVGTransform#setRotate(float,float,float).
 void setScale(float sx, float sy)
          DOM: Implements SVGTransform#setScale(float,float).
 void setSkewX(float angle)
          DOM: Implements SVGTransform#setSkewX(float).
 void setSkewY(float angle)
          DOM: Implements SVGTransform#setSkewY(float).
 void setTranslate(float tx, float ty)
          DOM: Implements SVGTransform#setTranslate(float,float).
protected  void setType(short type)
          Sets the type of transformation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected short type
Type of the transformation. Before any values are set, the type is unknown.


affineTransform

protected java.awt.geom.AffineTransform affineTransform
The transformation as a Java2D {link AffineTransform}.


angle

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.


x

protected float x
The x coordinate of the center of the rotation, if this transformation is a rotation.


y

protected float y
The y coordinate of the center of the rotation, if this transformation is a rotation.

Constructor Detail

AbstractSVGTransform

public AbstractSVGTransform()
Method Detail

createMatrix

protected abstract SVGMatrix createMatrix()
Creates and returns a new SVGMatrix for exposing the transformation as a matrix.

Returns:
SVGMatrix representing the transformation

setType

protected void setType(short type)
Sets the type of transformation.


getX

public float getX()
Returns the x coordinate of the center of the rotation, if this transformation is a rotation.


getY

public float getY()
Returns the y coordinate of the center of the rotation, if this transformation is a rotation.


assign

public void assign(AbstractSVGTransform t)
Copies the value of the specified transformation into this object.


getType

public short getType()
DOM: Implements SVGTransform#getType().


getMatrix

public SVGMatrix getMatrix()
DOM: Implements SVGTransform#getMatrix().


getAngle

public float getAngle()
DOM: Implements SVGTransform#getAngle().


setMatrix

public void setMatrix(SVGMatrix matrix)
DOM: Implements SVGTransform#setMatrix(SVGMatrix).


setTranslate

public void setTranslate(float tx,
                         float ty)
DOM: Implements SVGTransform#setTranslate(float,float).


setScale

public void setScale(float sx,
                     float sy)
DOM: Implements SVGTransform#setScale(float,float).


setRotate

public void setRotate(float angle,
                      float cx,
                      float cy)
DOM: Implements SVGTransform#setRotate(float,float,float).


setSkewX

public void setSkewX(float angle)
DOM: Implements SVGTransform#setSkewX(float).


setSkewY

public void setSkewY(float angle)
DOM: Implements SVGTransform#setSkewY(float).



Copyright ? 2008 Apache Software Foundation. All Rights Reserved.