de.dante.extex.font.type.tfm
Class TFMFixWord

java.lang.Object
  extended byde.dante.extex.font.type.tfm.TFMFixWord
All Implemented Interfaces:
java.io.Serializable

public class TFMFixWord
extends java.lang.Object
implements java.io.Serializable

TFM-FixWord

The dimensions are represented in the same way as in tfm files. Higher 12 bits is the whole part and lower 20 bits is the fractional part.

Version:
$Revision: 1.8 $
Author:
Michael Niedermair
See Also:
Serialized Form

Field Summary
static int CONV
          conf
static int FIXWORDDENOMINATOR
          fixdominator
static int FRACTIONDIGITS
          FRACTIONDIGITS
static TFMFixWord NULL
          NULL
static TFMFixWord TEN
          TEN
static int TFMCONV
          tfmconf
static TFMFixWord UNITY
          UNITY
static TFMFixWord ZERO
          ZERO
 
Constructor Summary
TFMFixWord()
          Create a new object
TFMFixWord(int val)
          Create a new object
TFMFixWord(int num, int den)
          Create new object
TFMFixWord(java.lang.String val)
          Create a new object
 
Method Summary
 long getValue()
          Return the internal value
 boolean lessThan(int num)
          less than
 boolean moreThan(int num)
          more than
 void setValue(long v)
          Set the value.
 double toDouble()
          Returns the value as double in untis.
 java.lang.String toString()
          Return the values as String
 java.lang.String toStringComma()
          Returns the value as Sting in untis with comma (0.00000...).
 java.lang.String toStringUnits()
          Return the value as String in units.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final TFMFixWord NULL
NULL


ZERO

public static final TFMFixWord ZERO
ZERO


UNITY

public static final TFMFixWord UNITY
UNITY


TEN

public static final TFMFixWord TEN
TEN


FIXWORDDENOMINATOR

public static final int FIXWORDDENOMINATOR
fixdominator

See Also:
Constant Field Values

TFMCONV

public static final int TFMCONV
tfmconf

See Also:
Constant Field Values

CONV

public static final int CONV
conf

See Also:
Constant Field Values

FRACTIONDIGITS

public static final int FRACTIONDIGITS
FRACTIONDIGITS

See Also:
Constant Field Values
Constructor Detail

TFMFixWord

public TFMFixWord(int val)
Create a new object

Parameters:
val - the values as int

TFMFixWord

public TFMFixWord()
Create a new object


TFMFixWord

public TFMFixWord(java.lang.String val)
Create a new object

Parameters:
val - the values as String

TFMFixWord

public TFMFixWord(int num,
                  int den)
Create new object

Parameters:
num - the num
den - the den
Method Detail

getValue

public long getValue()
Return the internal value

Returns:
the internal value

lessThan

public boolean lessThan(int num)
less than

Parameters:
num - the value to compare
Returns:
true, if the internal values is lesser, otherwise false

moreThan

public boolean moreThan(int num)
more than

Parameters:
num - the value to compare
Returns:
true, if the internal values are more, otherwise false

toStringUnits

public java.lang.String toStringUnits()
Return the value as String in units.

It devide the value by 1000.

Returns:
the value as String in units

toStringComma

public java.lang.String toStringComma()
Returns the value as Sting in untis with comma (0.00000...).

Returns:
Returns the value as Sting in untis with comma.

toDouble

public double toDouble()
Returns the value as double in untis.

Returns:
Returns the value as double in untis.

toString

public java.lang.String toString()
Return the values as String

Returns:
the values as String

setValue

public void setValue(long v)
Set the value.

Parameters:
v - The value to set.