jfig.utils
Class SimpleLatexParser.Box
java.lang.Object
jfig.utils.SimpleLatexParser.Box
- Direct Known Subclasses:
- SimpleLatexParser.CharBox, SimpleLatexParser.SubSuperScriptBox
- Enclosing class:
- SimpleLatexParser
- class SimpleLatexParser.Box
- extends java.lang.Object
like TeX, we try to abut aligned Box'es, each of which consists
of other Boxes in turn, with a single character as the basic
building block.
Boxes are aligned along their baselines, where the integer values
(x,y) specify the 75 dpi screen-coordinates of the origin for
a box, while the values of w, a, d specify the width, ascent,
and descent of the box.
The formatting should probably changed to use FIG 2400 dpi world-
coordinates instead of screen-coordinates, but the JDK 1.3+ font
rendering does not really improve with higher resolution :-(
Unlike TeX, we use the predefined (Postscript) FIG fonts and
assume the Unicode encoding.
For jfig, a Box may be mapped to a FigCompound that holds FigText
objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
x
protected int x
y
protected int y
w
protected int w
a
protected int a
d
protected int d
next
protected SimpleLatexParser.Box next
SimpleLatexParser.Box
SimpleLatexParser.Box()
move
public void move(int dx,
int dy)
getX
public int getX()
getY
public int getY()
getW
public int getW()
getA
public int getA()
getD
public int getD()
setX
public void setX(int x)
setY
public void setY(int y)
setW
public void setW(int w)
setA
public void setA(int a)
setD
public void setD(int d)
getNextBox
public SimpleLatexParser.Box getNextBox()
setNextBox
public void setNextBox(SimpleLatexParser.Box box)
append
public void append(SimpleLatexParser.Box child)
measure
public void measure()
getBounds
public java.awt.Rectangle getBounds()
getAbutmentPoint
public java.awt.Point getAbutmentPoint()
setOrigin
public void setOrigin(java.awt.Point p)
toString
public java.lang.String toString()
dump
public void dump(java.io.PrintStream PS)
convertToFig
public void convertToFig(FigCompound parent)
- construct a FIG object from this Box and all its child boxes
and put those as members into the specified FigCompound group object.
Check the display_boxes flag to decide whether to generate
bounding boxes, too.
getFigRectangle
public FigRectangle getFigRectangle(FigCompound parent,
int colorIndex,
int layer)
- construct a FigRectangle at 2400dpi world-coordinates from
our Box coordinates, and put it as a member into the specified
FigCompound group object.