|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcox.jmatt.java.MathTools.markup.latex.LaBaseTag
cox.jmatt.java.MathTools.markup.latex.LaPicture
public class LaPicture
This class provides the '/picture' environment complete with '/setlength{/unitlength}{}' directive. It provides both single ('/put') and multiple ('/multiput') versions for all drawing commands that allow them. The Bezier drawing command ('/qbezier') has only the standard version. No value-checking is done for the commands that restrict the (integer) values of the direction vectors.
Field Summary |
---|
Fields inherited from class cox.jmatt.java.MathTools.markup.latex.LaBaseTag |
---|
BS, DBS, DBSN, myAuthor, myDate, myEndTag, myEnvironment, myEnvParams, myOptions, myPicHasOrigin, myPicX, myPicXOrigin, myPicY, myPicYOrigin, mySectionLabel, myTagName, myTitle |
Constructor Summary | |
---|---|
LaPicture(int pX,
int pY)
Standard constructor. |
|
LaPicture(int pX,
int pY,
int pX0,
int pY0)
Constructor to specify width, height and relative origin values. |
Method Summary | |
---|---|
LaPicture |
circle(double pX,
double pY,
double pDiameter)
This command draws an unfilled circle. |
LaPicture |
circle(double pX,
double pY,
double pDiameter,
double pDX,
double pDY,
int pNum)
The '/multiput' circle command. |
LaPicture |
closeSaveBox(boolean pForce)
Close any open savebox. |
LaPicture |
copyOf()
Copy the current picture information. |
LaPicture |
copyOfSET()
Copy the current picture information with no end tag. |
LaPicture |
disc(double pX,
double pY,
double pDiameter)
This command draws a filled circle. |
LaPicture |
disc(double pX,
double pY,
double pDiameter,
double pDX,
double pDY,
int pNum)
The '/multiput' disc command. |
LaPicture |
line(double pX,
double pY,
int pDirX,
int pDirY,
double pLen)
Draw a single line. |
LaPicture |
line(double pX,
double pY,
int pDirX,
int pDirY,
double pLen,
double pDX,
double pDY,
int pNum)
Draw a '/multiput' line. |
LaPicture |
openSaveBox(java.lang.String pName,
double pWidth,
double pHeight,
java.lang.String pPos)
Create and open a savebox. |
LaPicture |
oval(double pX,
double pY,
double pWidth,
double pHeight,
java.lang.String pPos)
Place a single oval in the drawing. |
LaPicture |
oval(double pX,
double pY,
double pWidth,
double pHeight,
java.lang.String pPos,
double pDX,
double pDY,
int pNum)
Multi-put oval. |
LaPicture |
put(double pX,
double pY,
double pDX,
double pDY,
double pNum,
java.lang.String pObject)
This method implements the '/multiput' directive. |
LaPicture |
put(double pX,
double pY,
java.lang.String pObject)
This is the basic '/put' command used to put things into the picture. |
LaPicture |
qBezier(double x1,
double y1,
double cX,
double cY,
double x2,
double y2)
Put a quadratic Bezier curve into the picture. |
void |
reset()
Overridden to reset the unit length ONLY to its default value. |
LaPicture |
setLineThickness(java.lang.String pThickness)
Set the line thickness. |
LaPicture |
setUnitLength(java.lang.String pLength)
Set the unit length. |
LaPicture |
thick()
Issue a '/thicklines' command. |
LaPicture |
thin()
Issue a '/thinlines' command. |
java.lang.String |
toString()
Overridden to set unit length prior to output. |
java.lang.String |
toStringSET()
Overridden to set unit length first. |
LaPicture |
useBox(double pX,
double pY,
java.lang.String pBoxName)
Use a (presumably) previously-defined savebox. |
LaPicture |
vector(double pX,
double pY,
int pDirX,
int pDirY,
double pLen)
Draw a single vector (arrow). |
LaPicture |
vector(double pX,
double pY,
int pDirX,
int pDirY,
double pLen,
double pDX,
double pDY,
int pNum)
Draw a '/multiput' arrow. |
Methods inherited from class cox.jmatt.java.MathTools.markup.latex.LaBaseTag |
---|
_addContent, _addRawContent, _getContent, _setEndTagEnabled, _setETEn, getEndTag, hasEndTag, isEndTagEnabled, setLabel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LaPicture(int pX, int pY)
public LaPicture(int pX, int pY, int pX0, int pY0)
Method Detail |
---|
public void reset()
reset
in class LaBaseTag
public LaPicture setUnitLength(java.lang.String pLength)
public LaPicture put(double pX, double pY, java.lang.String pObject)
pX
- The x-coordinate of the item's location.pY
- The y-coordinate of the location.pObject
- The object to be placed in the picture.public LaPicture put(double pX, double pY, double pDX, double pDY, double pNum, java.lang.String pObject)
pX
- The x-coordinate of the item's location.pY
- The y-coordinate of the location.pDX
- The x-value of the translation vector.pDY
- The y-value of the translation vector.pNum
- The number of copies to put.pObject
- The object to be placed in the picture.public LaPicture thick()
public LaPicture thin()
public LaPicture setLineThickness(java.lang.String pThickness)
public LaPicture line(double pX, double pY, int pDirX, int pDirY, double pLen)
pX
- The x-coordinate of the line's origin.pY
- The y-coordiante of the origin.pDirX
- The x-value of the direction vector.pDirY
- The y-value of the direction vector.pLen
- The length of the line.public LaPicture line(double pX, double pY, int pDirX, int pDirY, double pLen, double pDX, double pDY, int pNum)
pX
- The x-coordinate of the line's origin.pY
- The y-coordiante of the origin.pDirX
- The x-value of the direction vector.pDirY
- The y-value of the direction vector.pLen
- The length of the line.pDX
- The '/multiput' translation vector x-value.pDY
- The '/multipyt' translation vector y-value.pNum
- The number of copies to make.public LaPicture vector(double pX, double pY, int pDirX, int pDirY, double pLen)
pX
- The x-coordinate of the line's origin.pY
- The y-coordiante of the origin.pDirX
- The x-value of the direction vector.pDirY
- The y-value of the direction vector.pLen
- The length of the line.public LaPicture vector(double pX, double pY, int pDirX, int pDirY, double pLen, double pDX, double pDY, int pNum)
pX
- The x-coordinate of the line's origin.pY
- The y-coordiante of the origin.pDirX
- The x-value of the direction vector.pDirY
- The y-value of the direction vector.pLen
- The length of the line.pDX
- The '/multiput' translation vector x-value.pDY
- The '/multipyt' translation vector y-value.pNum
- The number of copies to make.public LaPicture circle(double pX, double pY, double pDiameter)
pX
- The x-coordinate of the center of the circle.pY
- The y-coordinate of the center.pDiameter
- The diameter of the circle.public LaPicture circle(double pX, double pY, double pDiameter, double pDX, double pDY, int pNum)
public LaPicture disc(double pX, double pY, double pDiameter)
pX
- The x-coordinate of the center of the circle.pY
- The y-coordinate of the center.pDiameter
- The diameter of the circle.public LaPicture disc(double pX, double pY, double pDiameter, double pDX, double pDY, int pNum)
public LaPicture oval(double pX, double pY, double pWidth, double pHeight, java.lang.String pPos)
pX
- The x-cordinate of the oval's center.pY
- The y-coordinate of the center.pWidth
- The width of the oval.pHeight
- The height of the oval.pPos
- The 'position' argument of the oval.public LaPicture oval(double pX, double pY, double pWidth, double pHeight, java.lang.String pPos, double pDX, double pDY, int pNum)
public LaPicture qBezier(double x1, double y1, double cX, double cY, double x2, double y2)
public LaPicture openSaveBox(java.lang.String pName, double pWidth, double pHeight, java.lang.String pPos)
Create and open a savebox. All subsequent drawing commands fall within the savebox until it is closed or another is opened. If the name assigned to the savebox is null or blank no box is opened. The backslash IS provided automatically so the name does not need it.
CRITICAL NOTES: The state of an open savebox is NOT preserved during a copy operation. If a LaPicture
is copied with a savebox opened it must
be forcibly closed manually. Also, saveboxes cannot be nested!
public LaPicture closeSaveBox(boolean pForce)
public LaPicture useBox(double pX, double pY, java.lang.String pBoxName)
pX
- The x-coordinate of the used box.pY
- The y-coordinate of the used box.pBoxName
- The name of the savebox to use. The backslash before the name IS provided automatically.public LaPicture copyOf()
copyOf
in class LaBaseTag
public LaPicture copyOfSET()
copyOfSET
in class LaBaseTag
public java.lang.String toString()
toString
in class LaBaseTag
public java.lang.String toStringSET()
toStringSET
in class LaBaseTag
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |