|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcox.jmatt.java.MathTools.markup.Tag
cox.jmatt.java.MathTools.markup.svg.StyleTag
cox.jmatt.java.MathTools.markup.svg.PathTag
public class PathTag
This class encapsulates the SVG <path> tag. It provides a quick way to set the path explicitly and commands to add elements to it. Each command comes in a relative and absolute flavor. The relative versions start with lowercase letters and the absolute versions with uppercase. The arguments for each flavor are the same.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag |
---|
StyleTag.TagKeys |
Field Summary |
---|
Fields inherited from class cox.jmatt.java.MathTools.markup.Tag |
---|
myTagName |
Constructor Summary | |
---|---|
PathTag()
Automatically constructs a <path> tag. |
Method Summary | |
---|---|
PathTag |
arcTo(double pRadX,
double pRadY,
double pXRot,
boolean pLargeArc,
boolean pSweep,
double pEndX,
double pEndY)
Draw an elliptical arc, relative version. |
PathTag |
ArcTo(double pRadX,
double pRadY,
double pXRot,
boolean pLargeArc,
boolean pSweep,
double pEndX,
double pEndY)
Draw an elliptical arc, absolute version. |
PathTag |
cCurveTo(double pC1X,
double pC1Y,
double pC2X,
double pC2Y,
double pX,
double pY)
Draw a cubic bezier curve to the specified endpoint relative to the current location. |
PathTag |
CCurveTo(double pC1X,
double pC1Y,
double pC2X,
double pC2Y,
double pX,
double pY)
Absolute version of the cubic curve. |
PathTag |
closePath()
Close the current (sub-) path. |
PathTag |
copyOf()
Create a copy of this tag. |
PathTag |
hLineTo(double pEnd)
Draw a horizontal line to the specified point, relative version. |
PathTag |
HLineTo(double pEnd)
Draw a horizontal line to the specified point, absolute version. |
PathTag |
lineTo(double pX,
double pY)
Draw a line to the specified point relative to the current location. |
PathTag |
LineTo(double pX,
double pY)
Draw a line to the specified point, absolute version. |
PathTag |
moveTo(double pX,
double pY)
Move to the specified point relative to the current location. |
PathTag |
MoveTo(double pX,
double pY)
Move to the specified point, absolute coordinates. |
PathTag |
qCurveTo(double pCX,
double pCY,
double pX,
double pY)
Draw a quadratic bezier curve to the specified endpoint relative to the current location. |
PathTag |
QCurveTo(double pCX,
double pCY,
double pX,
double pY)
Draw a quatratic curve, absolute version. |
void |
reset()
Overridden to clear out any path data. |
PathTag |
sCurveTo(double pCX,
double pCY,
double pX,
double pY)
Add a smooth cubic polybezier curve. |
PathTag |
SCurveTo(double pCX,
double pCY,
double pX,
double pY)
Smooth cubic polybezier curve, absolute version. |
PathTag |
setPath(java.lang.String pPath)
Set the path to the String supplied, or clear it with null or blank. |
PathTag |
tCurveTo(double pX,
double pY)
Draw a smooth quadratic polybezier curve; only the endpoint is required, the control point is calcuated automatically. |
PathTag |
TCurveTo(double pX,
double pY)
Draw a smooth quadratic polybezier curve, absolute version. |
java.lang.String |
toString()
Overridden to add the actual path to the tag at the last instant. |
PathTag |
vLineTo(double pEnd)
Draw a vertical line to the specified point, relative version. |
PathTag |
VLineTo(double pEnd)
Draw a vertical line to the specified point, absolute version. |
Methods inherited from class cox.jmatt.java.MathTools.markup.svg.StyleTag |
---|
_configureTag, _enableCopy, canHaveDefs, isInDefs, setDefaultPen, setDefaultStyle, setDefaultTransform, setPen, setStyle, setTransform |
Methods inherited from class cox.jmatt.java.MathTools.markup.Tag |
---|
_addAttribute, _addAttributes, _addNAttribute, _asBoolean, _asDouble, _asInt, _attributes, _clampNAttribute, _clampNAttribute, _content, _fixKey, _setContent, _setEnableXMLTag, badPizza, closeTag, configureTag, configureTagFromGlobalPizza, makeTag, openTag, setID, validString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PathTag()
Method Detail |
---|
public void reset()
reset
in class Tag
public PathTag copyOf()
public java.lang.String toString()
toString
in class Tag
public PathTag setPath(java.lang.String pPath)
public PathTag closePath()
public PathTag moveTo(double pX, double pY)
pX
- The X-coordinate of the destination.pY
- The destination Y-cooridnate.
public PathTag MoveTo(double pX, double pY)
pX
- The X-coordinate of the destination.pY
- The destination Y-cooridnate.
public PathTag lineTo(double pX, double pY)
pX
- The X-coordinate of the endpoint.pY
- The Y-coordinate of the endpoint.
public PathTag LineTo(double pX, double pY)
pX
- The X-coordinate of the endpoint.pY
- The Y-coordinate of the endpoint.
public PathTag hLineTo(double pEnd)
pEnd
- The (relative) endpoint of the horizontal segment.public PathTag HLineTo(double pEnd)
pEnd
- The (absolute) endpoint of the horizontal segment.public PathTag vLineTo(double pEnd)
pEnd
- The (relative) endpoint of the vertical segment.public PathTag VLineTo(double pEnd)
pEnd
- The (absolute) endpoint of the vertical segment.public PathTag arcTo(double pRadX, double pRadY, double pXRot, boolean pLargeArc, boolean pSweep, double pEndX, double pEndY)
pRadX
- The X-radius of the arc.pRadY
- The Y-radius of the arc.pXRot
- The X-axis rotation.pLargeArc
- false (0) if the arc is less than 180 degrees, true (1) if it is greater.pSweep
- false (0) to draw in the negative angle direction, true (1) for the positive angle direction.pEndX
- The X-coordinate of the endpoint.pEndY
- The Y-coordinate of the endpoint.
public PathTag ArcTo(double pRadX, double pRadY, double pXRot, boolean pLargeArc, boolean pSweep, double pEndX, double pEndY)
public PathTag qCurveTo(double pCX, double pCY, double pX, double pY)
pCX
- The X-coordinate of the control point.pCY
- The Y-coordinate of the control point.pX
- The X-coordinate of the endpoint.pY
- The Y-coordinate of the endpoint.
public PathTag QCurveTo(double pCX, double pCY, double pX, double pY)
public PathTag tCurveTo(double pX, double pY)
pX
- The endpoint X-coordinate.pY
- The endpoint Y-coordinate.
public PathTag TCurveTo(double pX, double pY)
public PathTag cCurveTo(double pC1X, double pC1Y, double pC2X, double pC2Y, double pX, double pY)
pC1X
- The X-coordinate of the first control point.pC1Y
- The Y-coordinate of the first control point.pC2X
- The X-coordinate of the second control point.pC2Y
- The Y-coordinate of the second control point.pX
- The X-coordinate of the endpoint.pY
- The Y-coordinate of the endpoint.
public PathTag CCurveTo(double pC1X, double pC1Y, double pC2X, double pC2Y, double pX, double pY)
public PathTag sCurveTo(double pCX, double pCY, double pX, double pY)
pCX
- The control point X-coordinate.pCY
- The control point Y-coordinate.pX
- The X-coordinate for the endpoint.pY
- The Y-coordinate of the endpoint.
public PathTag SCurveTo(double pCX, double pCY, double pX, double pY)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |