|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.font.format.tfm.TfmFixWord
public class TfmFixWord
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.
| Field Summary | |
|---|---|
static int |
CONV
conf. |
static int |
FIXWORDDENOMINATOR
fixdominator. |
static int |
FRACTIONDIGITS
FRACTIONDIGITS. |
static TfmFixWord |
NULL
NULL. |
static int |
POINTSHIFT
POINT-SHIFT. |
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. |
Dimen |
toDimen(FixedDimen size)
Convert the fixword value to a dimen value. |
static Dimen |
toDimen(FixedDimen desingsize,
long val)
Convert the fixword value to a dimen value. |
static Dimen |
toDimen(FixedDimen desingsize,
TfmFixWord fw)
Convert the fixword to a dimen 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. |
static long |
toValue(FixedDimen desingsize,
FixedDimen dimen)
Convert a dimen to a fix word value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int CONV
public static final int FIXWORDDENOMINATOR
public static final int FRACTIONDIGITS
public static final TfmFixWord NULL
public static final int POINTSHIFT
public static final TfmFixWord TEN
public static final int TFMCONV
public static final TfmFixWord UNITY
public static final TfmFixWord ZERO
| Constructor Detail |
|---|
public TfmFixWord()
public TfmFixWord(int val)
val - the values as int. This int value represents the length in
points.
public TfmFixWord(int num,
int den)
num - the numden - the denpublic TfmFixWord(java.lang.String val)
val - the values as String| Method Detail |
|---|
public static Dimen toDimen(FixedDimen desingsize,
long val)
see toDimen(FixedDimen size)
desingsize - The design size.val - The value.
Dimen of the value.
public static Dimen toDimen(FixedDimen desingsize,
TfmFixWord fw)
see toDimen(FixedDimen size)
desingsize - The design size.fw - The fix word.
Dimen of the value.
public static long toValue(FixedDimen desingsize,
FixedDimen dimen)
desingsize - The design size.dimen - The dimen value.
public long getValue()
public boolean lessThan(int num)
num - the value to compare
true, if the internal values is lesser, otherwise
falsepublic boolean moreThan(int num)
num - the value to compare
true, if the internal values are more, otherwise
falsepublic void setValue(long v)
v - The value to set.public Dimen toDimen(FixedDimen size)
the simple calculation fw.getValue() * actualsize.getValue() / TFMFixWord.FIXWORDDENOMINATOR leads to different rounding than in TeX due to a limitation to 4 byte integer precission. Note that fw.getValue() * actualsize.getValue() might exceed the 4 byte range. Hence TTP 571 cancels actualsize.getValue() and TFMFixWord.FIXWORDDENOMINATOR to allow for a bytewise calculation. We do not need this bytewise calculation since we have long integers, but we need to be precise in performing the same rounding.
size - The font size (design size for font dimen, actual size for
all others)
public double toDouble()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toStringComma()
public java.lang.String toStringUnits()
It devide the value by 1000.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||