org.apache.batik.dom.svg
Class AbstractSVGTransform

java.lang.Object
  |
  +--org.apache.batik.dom.svg.AbstractSVGTransform
All Implemented Interfaces:
SVGTransform
Direct Known Subclasses:
AbstractSVGTransformList.SVGTransformItem, SVGOMTransform

public abstract class AbstractSVGTransform
extends java.lang.Object
implements SVGTransform

Abstract implementation for SVGTransform. This is the base implementation for SVGTransform


Field Summary
protected  java.awt.geom.AffineTransform affineTransform
          AffineTranform associated to the SVGTransform Java2D representation of the SVGTransform.
protected  float angle
          Angle associated to the transform.
protected  short type
          Type of the transformation.
protected  float x
           
protected  float y
           
 
Fields inherited from interface org.w3c.dom.svg.SVGTransform
SVG_TRANSFORM_MATRIX, SVG_TRANSFORM_ROTATE, SVG_TRANSFORM_SCALE, SVG_TRANSFORM_SKEWX, SVG_TRANSFORM_SKEWY, SVG_TRANSFORM_TRANSLATE, SVG_TRANSFORM_UNKNOWN
 
Constructor Summary
protected AbstractSVGTransform()
          Default constructor.
 
Method Summary
protected abstract  SVGMatrix createMatrix()
          Create a SVGMatrix associated to the transform.
 float getAngle()
           
 SVGMatrix getMatrix()
           
 short getType()
           
protected  float getX()
           
protected  float getY()
           
 void setMatrix(SVGMatrix matrix)
           
 void setRotate(float angle, float cx, float cy)
           
 void setScale(float sx, float sy)
           
 void setSkewX(float angle)
           
 void setSkewY(float angle)
           
 void setTranslate(float tx, float ty)
           
protected  void setType(short type)
           
 
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. By default, the type is unknown

affineTransform

protected java.awt.geom.AffineTransform affineTransform
AffineTranform associated to the SVGTransform Java2D representation of the SVGTransform.

angle

protected float angle
Angle associated to the transform. This value is not necessary since the AffineTransform will contain it but it is easier to have it than extracting it from the AffineTransform.

x

protected float x

y

protected float y
Constructor Detail

AbstractSVGTransform

protected AbstractSVGTransform()
Default constructor.
Method Detail

createMatrix

protected abstract SVGMatrix createMatrix()
Create a SVGMatrix associated to the transform.
Returns:
SVGMatrix representing the transformation

setType

protected void setType(short type)

getX

protected float getX()

getY

protected float getY()

getType

public short getType()
Specified by:
getType in interface SVGTransform

getMatrix

public SVGMatrix getMatrix()
Specified by:
getMatrix in interface SVGTransform

getAngle

public float getAngle()
Specified by:
getAngle in interface SVGTransform

setMatrix

public void setMatrix(SVGMatrix matrix)
Specified by:
setMatrix in interface SVGTransform

setTranslate

public void setTranslate(float tx,
                         float ty)
Specified by:
setTranslate in interface SVGTransform

setScale

public void setScale(float sx,
                     float sy)
Specified by:
setScale in interface SVGTransform

setRotate

public void setRotate(float angle,
                      float cx,
                      float cy)
Specified by:
setRotate in interface SVGTransform

setSkewX

public void setSkewX(float angle)
Specified by:
setSkewX in interface SVGTransform

setSkewY

public void setSkewY(float angle)
Specified by:
setSkewY in interface SVGTransform


Copyright © 2004 Apache Software Foundation. All Rights Reserved.