org.apache.batik.parser

Class PathArrayProducer

public class PathArrayProducer extends Object implements PathHandler

A handler class that generates an array of shorts and an array floats from parsing path data.
Field Summary
protected short[]c
The current short[] object.
protected intccount
The total number of path commands accumulated.
protected intcindex
The index in which to store the next path command.
protected LinkedListcs
List of short[] objects.
protected float[]p
The current float[] object.
protected intpcount
The total number of path parameters accumulated.
protected intpindex
The index in which to store the next path parameter.
protected LinkedListps
List of float[] objects.
Method Summary
voidarcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements PathHandler.
voidarcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements PathHandler.
voidclosePath()
Implements closePath.
protected voidcommand(short val)
Adds a path command to the list.
voidcurvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y)
Implements PathHandler.
voidcurvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)
Implements PathHandler.
voidcurvetoCubicSmoothAbs(float x2, float y2, float x, float y)
Implements PathHandler.
voidcurvetoCubicSmoothRel(float x2, float y2, float x, float y)
Implements PathHandler.
voidcurvetoQuadraticAbs(float x1, float y1, float x, float y)
Implements PathHandler.
voidcurvetoQuadraticRel(float x1, float y1, float x, float y)
Implements PathHandler.
voidcurvetoQuadraticSmoothAbs(float x, float y)
Implements PathHandler.
voidcurvetoQuadraticSmoothRel(float x, float y)
Implements PathHandler.
voidendPath()
Implements endPath.
short[]getPathCommands()
Returns the array of path commands accumulated.
float[]getPathParameters()
Returns the array of path parameters accumulated.
voidlinetoAbs(float x, float y)
Implements PathHandler.
voidlinetoHorizontalAbs(float x)
Implements PathHandler.
voidlinetoHorizontalRel(float x)
Implements PathHandler.
voidlinetoRel(float x, float y)
Implements PathHandler.
voidlinetoVerticalAbs(float y)
Implements PathHandler.
voidlinetoVerticalRel(float y)
Implements PathHandler.
voidmovetoAbs(float x, float y)
Implements PathHandler.
voidmovetoRel(float x, float y)
Implements PathHandler.
protected voidparam(float val)
Adds a path parameter to the list.
voidstartPath()
Implements startPath.

Field Detail

c

protected short[] c
The current short[] object.

ccount

protected int ccount
The total number of path commands accumulated.

cindex

protected int cindex
The index in which to store the next path command.

cs

protected LinkedList cs
List of short[] objects.

p

protected float[] p
The current float[] object.

pcount

protected int pcount
The total number of path parameters accumulated.

pindex

protected int pindex
The index in which to store the next path parameter.

ps

protected LinkedList ps
List of float[] objects.

Method Detail

arcAbs

public void arcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements PathHandler.

arcRel

public void arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements PathHandler.

closePath

public void closePath()
Implements closePath.

command

protected void command(short val)
Adds a path command to the list.

curvetoCubicAbs

public void curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y)
Implements PathHandler.

curvetoCubicRel

public void curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)
Implements PathHandler.

curvetoCubicSmoothAbs

public void curvetoCubicSmoothAbs(float x2, float y2, float x, float y)
Implements PathHandler.

curvetoCubicSmoothRel

public void curvetoCubicSmoothRel(float x2, float y2, float x, float y)
Implements PathHandler.

curvetoQuadraticAbs

public void curvetoQuadraticAbs(float x1, float y1, float x, float y)
Implements PathHandler.

curvetoQuadraticRel

public void curvetoQuadraticRel(float x1, float y1, float x, float y)
Implements PathHandler.

curvetoQuadraticSmoothAbs

public void curvetoQuadraticSmoothAbs(float x, float y)
Implements PathHandler.

curvetoQuadraticSmoothRel

public void curvetoQuadraticSmoothRel(float x, float y)
Implements PathHandler.

endPath

public void endPath()
Implements endPath.

getPathCommands

public short[] getPathCommands()
Returns the array of path commands accumulated.

getPathParameters

public float[] getPathParameters()
Returns the array of path parameters accumulated.

linetoAbs

public void linetoAbs(float x, float y)
Implements PathHandler.

linetoHorizontalAbs

public void linetoHorizontalAbs(float x)
Implements PathHandler.

linetoHorizontalRel

public void linetoHorizontalRel(float x)
Implements PathHandler.

linetoRel

public void linetoRel(float x, float y)
Implements PathHandler.

linetoVerticalAbs

public void linetoVerticalAbs(float y)
Implements PathHandler.

linetoVerticalRel

public void linetoVerticalRel(float y)
Implements PathHandler.

movetoAbs

public void movetoAbs(float x, float y)
Implements PathHandler.

movetoRel

public void movetoRel(float x, float y)
Implements PathHandler.

param

protected void param(float val)
Adds a path parameter to the list.

startPath

public void startPath()
Implements startPath.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.