org.extex.font.format.dvi
Class DviValues

java.lang.Object
  extended by org.extex.font.format.dvi.DviValues

public class DviValues
extends java.lang.Object

Values for dvi.

The values of h, v, w, x, y, and z are signed integers having up to 32 bits, including the sign.

Since they represent physical distances, there is a small unit of measurement such that increasing h by 1 means moving a certain tiny distance to the right. The actual unit of measurement is variable.

The current font f is an integer; this value is changed only by fnt and fnt_num commands.

The current position on the page is given by two numbers called the horizontal and vertical coordinates, h and v.

Both coordinates are zero at the upper left corner of the page; moving to the right corresponds to increasing the horizontal coordinate, and moving down corresponds to increasing the vertical coordinate. Thus, the coordinates are essentially Cartesian, except that vertical directions are flipped; the Cartesian version of (h,v) would be (h,-v).

The current spacing amounts are given by four numbers w, x, y, and z, where w and x are used for horizontal spacing and where y and z are used for vertical spacing.

There is a stack containing (h,v,w,x,y,z) values; the DVI commands push and pop are used to change the current level of operation. Note that the current font f is not pushed and popped; the stack contains only information about positioning.

Version:
$Revision: 7275 $
Author:
Michael Niedermair

Constructor Summary
DviValues()
          Create a new object.
DviValues(DviValues val)
          Create a new object.
 
Method Summary
 void addH(int ah)
           
 void addV(int av)
           
 void clear()
          clear all values (without f!).
 int getF()
          Returns the f.
 int getH()
          Returns the h.
 int getV()
          Returns the v.
 int getW()
          Returns the w.
 int getX()
          Returns the x.
 int getY()
          Returns the y.
 int getZ()
          Returns the z.
 boolean isClear()
          Check, if the values (h,v,w,x,z,z) all zero.
 void setF(int af)
           
 void setH(int ah)
           
 void setV(int av)
           
 void setValues(DviValues val)
          set the values (without f!)
 void setW(int aw)
           
 void setX(int ax)
           
 void setY(int ay)
           
 void setZ(int az)
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DviValues

public DviValues()
Create a new object.


DviValues

public DviValues(DviValues val)
Create a new object.

Parameters:
val - the new values.
Method Detail

addH

public void addH(int ah)
Parameters:
ah - The h to add.

addV

public void addV(int av)
Parameters:
av - The v to add.

clear

public void clear()
clear all values (without f!).


getF

public int getF()
Returns the f.

Returns:
Returns the f.

getH

public int getH()
Returns the h.

Returns:
Returns the h.

getV

public int getV()
Returns the v.

Returns:
Returns the v.

getW

public int getW()
Returns the w.

Returns:
Returns the w.

getX

public int getX()
Returns the x.

Returns:
Returns the x.

getY

public int getY()
Returns the y.

Returns:
Returns the y.

getZ

public int getZ()
Returns the z.

Returns:
Returns the z.

isClear

public boolean isClear()
Check, if the values (h,v,w,x,z,z) all zero.

Returns:
Returns true, if all values are zero.

setF

public void setF(int af)
Parameters:
af - The f to set.

setH

public void setH(int ah)
Parameters:
ah - The h to set.

setV

public void setV(int av)
Parameters:
av - The v to set.

setValues

public void setValues(DviValues val)
set the values (without f!)

Parameters:
val - the new values

setW

public void setW(int aw)
Parameters:
aw - The w to set.

setX

public void setX(int ax)
Parameters:
ax - The x to set.

setY

public void setY(int ay)
Parameters:
ay - The y to set.

setZ

public void setZ(int az)
Parameters:
az - The z to set.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()