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 {@link PathHandler#arcAbs(float,float,float,boolean,boolean,float,float)}.
voidarcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements {@link PathHandler#arcRel(float,float,float,boolean,boolean,float,float)}.
voidclosePath()
Implements {@link PathHandler#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 {@link PathHandler#curvetoCubicAbs(float,float,float,float,float,float)}.
voidcurvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicRel(float,float,float,float,float,float)}.
voidcurvetoCubicSmoothAbs(float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicSmoothAbs(float,float,float,float)}.
voidcurvetoCubicSmoothRel(float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicSmoothRel(float,float,float,float)}.
voidcurvetoQuadraticAbs(float x1, float y1, float x, float y)
Implements {@link PathHandler#curvetoQuadraticAbs(float,float,float,float)}.
voidcurvetoQuadraticRel(float x1, float y1, float x, float y)
Implements {@link PathHandler#curvetoQuadraticRel(float,float,float,float)}.
voidcurvetoQuadraticSmoothAbs(float x, float y)
Implements {@link PathHandler#curvetoQuadraticSmoothAbs(float,float)}.
voidcurvetoQuadraticSmoothRel(float x, float y)
Implements {@link PathHandler#curvetoQuadraticSmoothRel(float,float)}.
voidendPath()
Implements {@link PathHandler#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 {@link PathHandler#linetoAbs(float,float)}.
voidlinetoHorizontalAbs(float x)
Implements {@link PathHandler#linetoHorizontalAbs(float)}.
voidlinetoHorizontalRel(float x)
Implements {@link PathHandler#linetoHorizontalRel(float)}.
voidlinetoRel(float x, float y)
Implements {@link PathHandler#linetoRel(float,float)}.
voidlinetoVerticalAbs(float y)
Implements {@link PathHandler#linetoVerticalAbs(float)}.
voidlinetoVerticalRel(float y)
Implements {@link PathHandler#linetoVerticalRel(float)}.
voidmovetoAbs(float x, float y)
Implements {@link PathHandler#movetoAbs(float,float)}.
voidmovetoRel(float x, float y)
Implements {@link PathHandler#movetoRel(float,float)}.
protected voidparam(float val)
Adds a path parameter to the list.
voidstartPath()
Implements {@link PathHandler#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 {@link PathHandler#arcAbs(float,float,float,boolean,boolean,float,float)}.

arcRel

public void arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)
Implements {@link PathHandler#arcRel(float,float,float,boolean,boolean,float,float)}.

closePath

public void closePath()
Implements {@link PathHandler#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 {@link PathHandler#curvetoCubicAbs(float,float,float,float,float,float)}.

curvetoCubicRel

public void curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicRel(float,float,float,float,float,float)}.

curvetoCubicSmoothAbs

public void curvetoCubicSmoothAbs(float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicSmoothAbs(float,float,float,float)}.

curvetoCubicSmoothRel

public void curvetoCubicSmoothRel(float x2, float y2, float x, float y)
Implements {@link PathHandler#curvetoCubicSmoothRel(float,float,float,float)}.

curvetoQuadraticAbs

public void curvetoQuadraticAbs(float x1, float y1, float x, float y)
Implements {@link PathHandler#curvetoQuadraticAbs(float,float,float,float)}.

curvetoQuadraticRel

public void curvetoQuadraticRel(float x1, float y1, float x, float y)
Implements {@link PathHandler#curvetoQuadraticRel(float,float,float,float)}.

curvetoQuadraticSmoothAbs

public void curvetoQuadraticSmoothAbs(float x, float y)
Implements {@link PathHandler#curvetoQuadraticSmoothAbs(float,float)}.

curvetoQuadraticSmoothRel

public void curvetoQuadraticSmoothRel(float x, float y)
Implements {@link PathHandler#curvetoQuadraticSmoothRel(float,float)}.

endPath

public void endPath()
Implements {@link PathHandler#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 {@link PathHandler#linetoAbs(float,float)}.

linetoHorizontalAbs

public void linetoHorizontalAbs(float x)
Implements {@link PathHandler#linetoHorizontalAbs(float)}.

linetoHorizontalRel

public void linetoHorizontalRel(float x)
Implements {@link PathHandler#linetoHorizontalRel(float)}.

linetoRel

public void linetoRel(float x, float y)
Implements {@link PathHandler#linetoRel(float,float)}.

linetoVerticalAbs

public void linetoVerticalAbs(float y)
Implements {@link PathHandler#linetoVerticalAbs(float)}.

linetoVerticalRel

public void linetoVerticalRel(float y)
Implements {@link PathHandler#linetoVerticalRel(float)}.

movetoAbs

public void movetoAbs(float x, float y)
Implements {@link PathHandler#movetoAbs(float,float)}.

movetoRel

public void movetoRel(float x, float y)
Implements {@link PathHandler#movetoRel(float,float)}.

param

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

startPath

public void startPath()
Implements {@link PathHandler#startPath()}.
Copyright B) 2007 Apache Software Foundation. All Rights Reserved.