|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.batik.parser.AWTPathProducer
This class provides an implementation of the PathHandler that initializes a Shape from the value of a path's 'd' attribute.
| Field Summary | |
protected float |
currentX
The current x position. |
protected float |
currentY
The current y position. |
protected ExtendedGeneralPath |
path
The temporary value of extendedGeneralPath. |
protected int |
windingRule
The winding rule to use to construct the path. |
protected float |
xCenter
The reference x point for smooth arcs. |
protected float |
yCenter
The reference y point for smooth arcs. |
| Constructor Summary | |
AWTPathProducer()
|
|
| 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(). |
static java.awt.Shape |
createShape(java.io.Reader r,
int wr)
Utility method for creating an ExtendedGeneralPath. |
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(). |
java.awt.Shape |
getShape()
Returns the Shape object initialized during the last parsing. |
int |
getWindingRule()
Returns the current winding rule. |
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). |
void |
setWindingRule(int i)
Sets the winding rule used to construct the path. |
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 |
protected ExtendedGeneralPath path
protected float currentX
protected float currentY
protected float xCenter
protected float yCenter
protected int windingRule
| Constructor Detail |
public AWTPathProducer()
| Method Detail |
public static java.awt.Shape createShape(java.io.Reader r,
int wr)
throws java.io.IOException,
ParseException
r - The reader used to read the path specification.wr - The winding rule to use for creating the path.public void setWindingRule(int i)
setWindingRule in interface ShapeProducerpublic int getWindingRule()
getWindingRule in interface ShapeProducerpublic java.awt.Shape getShape()
getShape in interface ShapeProducer
public void startPath()
throws ParseException
PathHandler.startPath().startPath in interface PathHandlerorg.apache.batik.parser.PathHandlerParseException - if an error occured while processing the path
public void endPath()
throws ParseException
PathHandler.endPath().endPath in interface PathHandlerorg.apache.batik.parser.PathHandlerParseException - if an error occured while processing the path
public void movetoRel(float x,
float y)
throws ParseException
PathHandler.movetoRel(float,float).movetoRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void movetoAbs(float x,
float y)
throws ParseException
PathHandler.movetoAbs(float,float).movetoAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void closePath()
throws ParseException
PathHandler.closePath().closePath in interface PathHandlerorg.apache.batik.parser.PathHandlerParseException - if an error occured while processing the path
public void linetoRel(float x,
float y)
throws ParseException
PathHandler.linetoRel(float,float).linetoRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void linetoAbs(float x,
float y)
throws ParseException
PathHandler.linetoAbs(float,float).linetoAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void linetoHorizontalRel(float x)
throws ParseException
PathHandler.linetoHorizontalRel(float).linetoHorizontalRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx - the relative X coordinate of the end pointParseException - if an error occured while processing the path
public void linetoHorizontalAbs(float x)
throws ParseException
PathHandler.linetoHorizontalAbs(float).linetoHorizontalAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx - the absolute X coordinate of the end pointParseException - if an error occured while processing the path
public void linetoVerticalRel(float y)
throws ParseException
PathHandler.linetoVerticalRel(float).linetoVerticalRel in interface PathHandlerorg.apache.batik.parser.PathHandlery - the relative Y coordinate of the end pointParseException - if an error occured while processing the path
public void linetoVerticalAbs(float y)
throws ParseException
PathHandler.linetoVerticalAbs(float).linetoVerticalAbs in interface PathHandlerorg.apache.batik.parser.PathHandlery - the absolute Y coordinate of the end pointParseException - if an error occured while processing the path
public void curvetoCubicRel(float x1,
float y1,
float x2,
float y2,
float x,
float y)
throws ParseException
PathHandler.curvetoCubicRel(float,float,float,float,float,float).curvetoCubicRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx1, y1 - the relative coordinates for the first control pointx2, y2 - the relative coordinates for the second control pointx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoCubicAbs(float x1,
float y1,
float x2,
float y2,
float x,
float y)
throws ParseException
PathHandler.curvetoCubicAbs(float,float,float,float,float,float).curvetoCubicAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx1, y1 - the absolute coordinates for the first control pointx2, y2 - the absolute coordinates for the second control pointx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoCubicSmoothRel(float x2,
float y2,
float x,
float y)
throws ParseException
PathHandler.curvetoCubicSmoothRel(float,float,float,float).curvetoCubicSmoothRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx2, y2 - the relative coordinates for the second control pointx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoCubicSmoothAbs(float x2,
float y2,
float x,
float y)
throws ParseException
PathHandler.curvetoCubicSmoothAbs(float,float,float,float).curvetoCubicSmoothAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx2, y2 - the absolute coordinates for the second control pointx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoQuadraticRel(float x1,
float y1,
float x,
float y)
throws ParseException
PathHandler.curvetoQuadraticRel(float,float,float,float).curvetoQuadraticRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx1, y1 - the relative coordinates for the control pointx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoQuadraticAbs(float x1,
float y1,
float x,
float y)
throws ParseException
PathHandler.curvetoQuadraticAbs(float,float,float,float).curvetoQuadraticAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx1, y1 - the absolute coordinates for the control pointx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoQuadraticSmoothRel(float x,
float y)
throws ParseException
PathHandler.curvetoQuadraticSmoothRel(float,float).curvetoQuadraticSmoothRel in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void curvetoQuadraticSmoothAbs(float x,
float y)
throws ParseException
PathHandler.curvetoQuadraticSmoothAbs(float,float).curvetoQuadraticSmoothAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
public void arcRel(float rx,
float ry,
float xAxisRotation,
boolean largeArcFlag,
boolean sweepFlag,
float x,
float y)
throws ParseException
PathHandler.arcRel(float,float,float,boolean,boolean,float,float).arcRel in interface PathHandlerorg.apache.batik.parser.PathHandlerrx - the X axis radius for the ellipsery - the Y axis radius for the ellipseangle - the rotation angle in degrees for the ellipse's X-axis
relative to the X-axislargeArcFlag - the value of the large-arc-flagsweepFlag - the value of the sweep-flagx, y - the relative coordinates for the end pointParseException - if an error occured while processing the path
public void arcAbs(float rx,
float ry,
float xAxisRotation,
boolean largeArcFlag,
boolean sweepFlag,
float x,
float y)
throws ParseException
PathHandler.arcAbs(float,float,float,boolean,boolean,float,float).arcAbs in interface PathHandlerorg.apache.batik.parser.PathHandlerrx - the X axis radius for the ellipsery - the Y axis radius for the ellipseangle - the rotation angle in degrees for the ellipse's X-axis
relative to the X-axislargeArcFlag - the value of the large-arc-flagsweepFlag - the value of the sweep-flagx, y - the absolute coordinates for the end pointParseException - if an error occured while processing the path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||