## org.apache.batik.parser
Class PathArrayProducer

    java.lang.Object
      org.apache.batik.parser.PathArrayProducer

All Implemented Interfaces:
  PathHandler

    public class PathArrayProducer

extends java.lang.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 int` `ccount` The total number of path commands accumulated.
`protected int` `cindex` The index in which to store the next path command.
`protected java.util.LinkedList` `cs` List of `short[]` objects.
`protected float[]` `p` The current `float[]` object.
`protected int` `pcount` The total number of path parameters accumulated.
`protected int` `pindex` The index in which to store the next path parameter.
`protected java.util.LinkedList` `ps` List of `float[]` objects.

Constructor Summary
`PathArrayProducer()`

Method Summary
`void` `arcAbs(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)` Implements `PathHandler.arcAbs(float,float,float,boolean,boolean,float,float)`.
`void` `arcRel(float rx, float ry, float xAxisRotation, boolean largeArcFlag, boolean sweepFlag, float x, float y)` Implements `PathHandler.arcRel(float,float,float,boolean,boolean,float,float)`.
`void` `closePath()` Implements `PathHandler.closePath()`.
`protected void` `command(short val)` Adds a path command to the list.
`void` `curvetoCubicAbs(float x1, float y1, float x2, float y2, float x, float y)` Implements `PathHandler.curvetoCubicAbs(float,float,float,float,float,float)`.
`void` `curvetoCubicRel(float x1, float y1, float x2, float y2, float x, float y)` Implements `PathHandler.curvetoCubicRel(float,float,float,float,float,float)`.
`void` `curvetoCubicSmoothAbs(float x2, float y2, float x, float y)` Implements `PathHandler.curvetoCubicSmoothAbs(float,float,float,float)`.
`void` `curvetoCubicSmoothRel(float x2, float y2, float x, float y)` Implements `PathHandler.curvetoCubicSmoothRel(float,float,float,float)`.
`void` `curvetoQuadraticAbs(float x1, float y1, float x, float y)` Implements `PathHandler.curvetoQuadraticAbs(float,float,float,float)`.
`void` `curvetoQuadraticRel(float x1, float y1, float x, float y)` Implements `PathHandler.curvetoQuadraticRel(float,float,float,float)`.
`void` `curvetoQuadraticSmoothAbs(float x, float y)` Implements `PathHandler.curvetoQuadraticSmoothAbs(float,float)`.
`void` `curvetoQuadraticSmoothRel(float x, float y)` Implements `PathHandler.curvetoQuadraticSmoothRel(float,float)`.
`void` `endPath()` Implements `PathHandler.endPath()`.
`short[]` `getPathCommands()` Returns the array of path commands accumulated.
`float[]` `getPathParameters()` Returns the array of path parameters accumulated.
`void` `linetoAbs(float x, float y)` Implements `PathHandler.linetoAbs(float,float)`.
`void` `linetoHorizontalAbs(float x)` Implements `PathHandler.linetoHorizontalAbs(float)`.
`void` `linetoHorizontalRel(float x)` Implements `PathHandler.linetoHorizontalRel(float)`.
`void` `linetoRel(float x, float y)` Implements `PathHandler.linetoRel(float,float)`.
`void` `linetoVerticalAbs(float y)` Implements `PathHandler.linetoVerticalAbs(float)`.
`void` `linetoVerticalRel(float y)` Implements `PathHandler.linetoVerticalRel(float)`.
`void` `movetoAbs(float x, float y)` Implements `PathHandler.movetoAbs(float,float)`.
`void` `movetoRel(float x, float y)` Implements `PathHandler.movetoRel(float,float)`.
`protected void` `param(float val)` Adds a path parameter to the list.
`void` `startPath()` Implements `PathHandler.startPath()`.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ps

    protected java.util.LinkedList ps

  List of `float[]` objects.

### p

    protected float[] p

  The current `float[]` object.

### cs

    protected java.util.LinkedList cs

  List of `short[]` objects.

### c

    protected short[] c

  The current `short[]` object.

### cindex

    protected int cindex

  The index in which to store the next path command.

### pindex

    protected int pindex

  The index in which to store the next path parameter.

### ccount

    protected int ccount

  The total number of path commands accumulated.

### pcount

    protected int pcount

  The total number of path parameters accumulated.

Constructor Detail

### PathArrayProducer

    public PathArrayProducer()

Method Detail

### getPathCommands

    public short[] getPathCommands()

  Returns the array of path commands accumulated.

### getPathParameters

    public float[] getPathParameters()

  Returns the array of path parameters accumulated.

### startPath

    public void startPath()
                   throws ParseException

  Implements `PathHandler.startPath()`.

  Specified by:
    `startPath` in interface `PathHandler`
  Throws:
    `ParseException` - if an error occured while processing the path

### movetoRel

    public void movetoRel(float x,
                          float y)
                   throws ParseException

  Implements `PathHandler.movetoRel(float,float)`.

  Specified by:
    `movetoRel` in interface `PathHandler`
  Parameters:
    `x` - the relative x coordinate for the end point
    `y` - the relative y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### movetoAbs

    public void movetoAbs(float x,
                          float y)
                   throws ParseException

  Implements `PathHandler.movetoAbs(float,float)`.

  Specified by:
    `movetoAbs` in interface `PathHandler`
  Parameters:
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### closePath

    public void closePath()
                   throws ParseException

  Implements `PathHandler.closePath()`.

  Specified by:
    `closePath` in interface `PathHandler`
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoRel

    public void linetoRel(float x,
                          float y)
                   throws ParseException

  Implements `PathHandler.linetoRel(float,float)`.

  Specified by:
    `linetoRel` in interface `PathHandler`
  Parameters:
    `x` - the relative x coordinates for the end point
    `y` - the relative y coordinates for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoAbs

    public void linetoAbs(float x,
                          float y)
                   throws ParseException

  Implements `PathHandler.linetoAbs(float,float)`.

  Specified by:
    `linetoAbs` in interface `PathHandler`
  Parameters:
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoHorizontalRel

    public void linetoHorizontalRel(float x)
                             throws ParseException

  Implements `PathHandler.linetoHorizontalRel(float)`.

  Specified by:
    `linetoHorizontalRel` in interface `PathHandler`
  Parameters:
    `x` - the relative X coordinate of the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoHorizontalAbs

    public void linetoHorizontalAbs(float x)
                             throws ParseException

  Implements `PathHandler.linetoHorizontalAbs(float)`.

  Specified by:
    `linetoHorizontalAbs` in interface `PathHandler`
  Parameters:
    `x` - the absolute X coordinate of the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoVerticalRel

    public void linetoVerticalRel(float y)
                           throws ParseException

  Implements `PathHandler.linetoVerticalRel(float)`.

  Specified by:
    `linetoVerticalRel` in interface `PathHandler`
  Parameters:
    `y` - the relative Y coordinate of the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### linetoVerticalAbs

    public void linetoVerticalAbs(float y)
                           throws ParseException

  Implements `PathHandler.linetoVerticalAbs(float)`.

  Specified by:
    `linetoVerticalAbs` in interface `PathHandler`
  Parameters:
    `y` - the absolute Y coordinate of the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoCubicRel

    public void curvetoCubicRel(float x1,
                                float y1,
                                float x2,
                                float y2,
                                float x,
                                float y)
                         throws ParseException

  Implements `PathHandler.curvetoCubicRel(float,float,float,float,float,float)`.

  Specified by:
    `curvetoCubicRel` in interface `PathHandler`
  Parameters:
    `x1` - the relative x coordinate for the first control point
    `y1` - the relative y coordinate for the first control point
    `x2` - the relative x coordinate for the second control point
    `y2` - the relative y coordinate for the second control point
    `x` - the relative x coordinate for the end point
    `y` - the relative y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoCubicAbs

    public void curvetoCubicAbs(float x1,
                                float y1,
                                float x2,
                                float y2,
                                float x,
                                float y)
                         throws ParseException

  Implements `PathHandler.curvetoCubicAbs(float,float,float,float,float,float)`.

  Specified by:
    `curvetoCubicAbs` in interface `PathHandler`
  Parameters:
    `x1` - the absolute x coordinate for the first control point
    `y1` - the absolute y coordinate for the first control point
    `x2` - the absolute x coordinate for the second control point
    `y2` - the absolute y coordinate for the second control point
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoCubicSmoothRel

    public void curvetoCubicSmoothRel(float x2,
                                      float y2,
                                      float x,
                                      float y)
                               throws ParseException

  Implements `PathHandler.curvetoCubicSmoothRel(float,float,float,float)`.

  Specified by:
    `curvetoCubicSmoothRel` in interface `PathHandler`
  Parameters:
    `x2` - the relative x coordinate for the second control point
    `y2` - the relative y coordinate for the second control point
    `x` - the relative x coordinate for the end point
    `y` - the relative y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoCubicSmoothAbs

    public void curvetoCubicSmoothAbs(float x2,
                                      float y2,
                                      float x,
                                      float y)
                               throws ParseException

  Implements `PathHandler.curvetoCubicSmoothAbs(float,float,float,float)`.

  Specified by:
    `curvetoCubicSmoothAbs` in interface `PathHandler`
  Parameters:
    `x2` - the absolute x coordinate for the second control point
    `y2` - the absolute y coordinate for the second control point
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoQuadraticRel

    public void curvetoQuadraticRel(float x1,
                                    float y1,
                                    float x,
                                    float y)
                             throws ParseException

  Implements `PathHandler.curvetoQuadraticRel(float,float,float,float)`.

  Specified by:
    `curvetoQuadraticRel` in interface `PathHandler`
  Parameters:
    `x1` - the relative x coordinate for the control point
    `y1` - the relative y coordinate for the control point
    `x` - the relative x coordinate for the end point
    `y` - the relative x coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoQuadraticAbs

    public void curvetoQuadraticAbs(float x1,
                                    float y1,
                                    float x,
                                    float y)
                             throws ParseException

  Implements `PathHandler.curvetoQuadraticAbs(float,float,float,float)`.

  Specified by:
    `curvetoQuadraticAbs` in interface `PathHandler`
  Parameters:
    `x1` - the absolute x coordinate for the control point
    `y1` - the absolute y coordinate for the control point
    `x` - the absolute x coordinate for the end point
    `y` - the absolute x coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoQuadraticSmoothRel

    public void curvetoQuadraticSmoothRel(float x,
                                          float y)
                                   throws ParseException

  Implements `PathHandler.curvetoQuadraticSmoothRel(float,float)`.

  Specified by:
    `curvetoQuadraticSmoothRel` in interface `PathHandler`
  Parameters:
    `x` - the relative x coordinate for the end point
    `y` - the relative y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### curvetoQuadraticSmoothAbs

    public void curvetoQuadraticSmoothAbs(float x,
                                          float y)
                                   throws ParseException

  Implements `PathHandler.curvetoQuadraticSmoothAbs(float,float)`.

  Specified by:
    `curvetoQuadraticSmoothAbs` in interface `PathHandler`
  Parameters:
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### arcRel

    public void arcRel(float rx,
                       float ry,
                       float xAxisRotation,
                       boolean largeArcFlag,
                       boolean sweepFlag,
                       float x,
                       float y)
                throws ParseException

  Implements `PathHandler.arcRel(float,float,float,boolean,boolean,float,float)`.

  Specified by:
    `arcRel` in interface `PathHandler`
  Parameters:
    `rx` - the X axis radius for the ellipse
    `ry` - the Y axis radius for the ellipse
    `xAxisRotation` - the rotation angle in degrees for the ellipse's X-axis relative to the X-axis
    `largeArcFlag` - the value of the large-arc-flag
    `sweepFlag` - the value of the sweep-flag
    `x` - the relative x coordinate for the end point
    `y` - the relative y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### arcAbs

    public void arcAbs(float rx,
                       float ry,
                       float xAxisRotation,
                       boolean largeArcFlag,
                       boolean sweepFlag,
                       float x,
                       float y)
                throws ParseException

  Implements `PathHandler.arcAbs(float,float,float,boolean,boolean,float,float)`.

  Specified by:
    `arcAbs` in interface `PathHandler`
  Parameters:
    `rx` - the X axis radius for the ellipse
    `ry` - the Y axis radius for the ellipse
    `xAxisRotation` - the rotation angle in degrees for the ellipse's X-axis relative to the X-axis
    `largeArcFlag` - the value of the large-arc-flag
    `sweepFlag` - the value of the sweep-flag
    `x` - the absolute x coordinate for the end point
    `y` - the absolute y coordinate for the end point
  Throws:
    `ParseException` - if an error occured while processing the path

### command

    protected void command(short val)
                    throws ParseException

  Adds a path command to the list.

  Throws:
    `ParseException`

### param

    protected void param(float val)
                  throws ParseException

  Adds a path parameter to the list.

  Throws:
    `ParseException`

### endPath

    public void endPath()
                 throws ParseException

  Implements `PathHandler.endPath()`.

  Specified by:
    `endPath` in interface `PathHandler`
  Throws:
    `ParseException` - if an error occured while processing the path

Copyright © 2008 Apache Software Foundation. All Rights Reserved.