|
mxGraph 2.5.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mxgraph.util.svg.AWTPathProducer
public class 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()
|
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 Shape createShape(String text, int wr) throws ParseException
text
- The text representation of the path specification.wr
- The winding rule to use for creating the path.
ParseException
public void setWindingRule(int i)
setWindingRule
in interface ShapeProducer
public int getWindingRule()
getWindingRule
in interface ShapeProducer
public Shape getShape()
getShape
in interface ShapeProducer
public void startPath() throws ParseException
PathHandler.startPath()
.
startPath
in interface PathHandler
ParseException
- if an error occured while processing the pathpublic void endPath() throws ParseException
PathHandler.endPath()
.
endPath
in interface PathHandler
ParseException
- if an error occured while processing the pathpublic void movetoRel(float x, float y) throws ParseException
PathHandler.movetoRel(float,float)
.
movetoRel
in interface PathHandler
x
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void movetoAbs(float x, float y) throws ParseException
PathHandler.movetoAbs(float,float)
.
movetoAbs
in interface PathHandler
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void closePath() throws ParseException
PathHandler.closePath()
.
closePath
in interface PathHandler
ParseException
- if an error occured while processing the pathpublic void linetoRel(float x, float y) throws ParseException
PathHandler.linetoRel(float,float)
.
linetoRel
in interface PathHandler
x
- the relative x coordinates for the end pointy
- the relative y coordinates for the end point
ParseException
- if an error occured while processing the pathpublic void linetoAbs(float x, float y) throws ParseException
PathHandler.linetoAbs(float,float)
.
linetoAbs
in interface PathHandler
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void linetoHorizontalRel(float x) throws ParseException
PathHandler.linetoHorizontalRel(float)
.
linetoHorizontalRel
in interface PathHandler
x
- the relative X coordinate of the end point
ParseException
- if an error occured while processing the pathpublic void linetoHorizontalAbs(float x) throws ParseException
PathHandler.linetoHorizontalAbs(float)
.
linetoHorizontalAbs
in interface PathHandler
x
- the absolute X coordinate of the end point
ParseException
- if an error occured while processing the pathpublic void linetoVerticalRel(float y) throws ParseException
PathHandler.linetoVerticalRel(float)
.
linetoVerticalRel
in interface PathHandler
y
- the relative Y coordinate of the end point
ParseException
- if an error occured while processing the pathpublic void linetoVerticalAbs(float y) throws ParseException
PathHandler.linetoVerticalAbs(float)
.
linetoVerticalAbs
in interface PathHandler
y
- the absolute Y coordinate of the end point
ParseException
- if an error occured while processing the pathpublic 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 PathHandler
x1
- the relative x coordinate for the first control pointy1
- the relative y coordinate for the first control pointx2
- the relative x coordinate for the second control pointy2
- the relative y coordinate for the second control pointx
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic 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 PathHandler
x1
- the absolute x coordinate for the first control pointy1
- the absolute y coordinate for the first control pointx2
- the absolute x coordinate for the second control pointy2
- the absolute y coordinate for the second control pointx
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoCubicSmoothRel(float x2, float y2, float x, float y) throws ParseException
PathHandler.curvetoCubicSmoothRel(float,float,float,float)
.
curvetoCubicSmoothRel
in interface PathHandler
x2
- the relative x coordinate for the second control pointy2
- the relative y coordinate for the second control pointx
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoCubicSmoothAbs(float x2, float y2, float x, float y) throws ParseException
PathHandler.curvetoCubicSmoothAbs(float,float,float,float)
.
curvetoCubicSmoothAbs
in interface PathHandler
x2
- the absolute x coordinate for the second control pointy2
- the absolute y coordinate for the second control pointx
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoQuadraticRel(float x1, float y1, float x, float y) throws ParseException
PathHandler.curvetoQuadraticRel(float,float,float,float)
.
curvetoQuadraticRel
in interface PathHandler
x1
- the relative x coordinate for the control pointy1
- the relative y coordinate for the control pointx
- the relative x coordinate for the end pointy
- the relative x coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoQuadraticAbs(float x1, float y1, float x, float y) throws ParseException
PathHandler.curvetoQuadraticAbs(float,float,float,float)
.
curvetoQuadraticAbs
in interface PathHandler
x1
- the absolute x coordinate for the control pointy1
- the absolute y coordinate for the control pointx
- the absolute x coordinate for the end pointy
- the absolute x coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoQuadraticSmoothRel(float x, float y) throws ParseException
PathHandler.curvetoQuadraticSmoothRel(float,float)
.
curvetoQuadraticSmoothRel
in interface PathHandler
x
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic void curvetoQuadraticSmoothAbs(float x, float y) throws ParseException
PathHandler.curvetoQuadraticSmoothAbs(float,float)
.
curvetoQuadraticSmoothAbs
in interface PathHandler
x
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic 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 PathHandler
rx
- the X axis radius for the ellipsery
- the Y axis radius for the ellipsexAxisRotation
- 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
- the relative x coordinate for the end pointy
- the relative y coordinate for the end point
ParseException
- if an error occured while processing the pathpublic 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 PathHandler
rx
- the X axis radius for the ellipsery
- the Y axis radius for the ellipsexAxisRotation
- 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
- the absolute x coordinate for the end pointy
- the absolute y coordinate for the end point
ParseException
- if an error occured while processing the path
|
mxGraph 2.5.0.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |