org.apache.batik.parser

Class AWTPolylineProducer

public class AWTPolylineProducer extends Object implements PointsHandler, ShapeProducer

This class produces a polyline shape from a reader.
Field Summary
protected booleannewPath
Is the current path a new one?
protected GeneralPathpath
The current path.
protected intwindingRule
The winding rule to use to construct the path.
Method Summary
static ShapecreateShape(Reader r, int wr)
Utility method for creating an ExtendedGeneralPath.
voidendPoints()
Implements endPoints.
ShapegetShape()
Returns the Shape object initialized during the last parsing.
intgetWindingRule()
Returns the current winding rule.
voidpoint(float x, float y)
Implements PointsHandler.
voidsetWindingRule(int i)
Sets the winding rule used to construct the path.
voidstartPoints()
Implements startPoints.

Field Detail

newPath

protected boolean newPath
Is the current path a new one?

path

protected GeneralPath path
The current path.

windingRule

protected int windingRule
The winding rule to use to construct the path.

Method Detail

createShape

public static Shape createShape(Reader r, int wr)
Utility method for creating an ExtendedGeneralPath.

Parameters: r The reader used to read the path specification. wr The winding rule to use for creating the path.

endPoints

public void endPoints()
Implements endPoints.

getShape

public Shape getShape()
Returns the Shape object initialized during the last parsing.

Returns: the shape or null if this handler has not been used by a parser.

getWindingRule

public int getWindingRule()
Returns the current winding rule.

point

public void point(float x, float y)
Implements PointsHandler.

setWindingRule

public void setWindingRule(int i)
Sets the winding rule used to construct the path.

startPoints

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