|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.extex.backend.documentWriter.postscript.util.PsUnit
public abstract class PsUnit
This class contains some utility methods.
| Field Summary | |
|---|---|
static int |
CM100_PER_IN
The constant CM100_PER_IN contains the number of 100 centimeters per inch. |
static int |
POINT_PER_100_IN
The field POINT_PER_100_IN contains the conversion factor from inch to point. |
static int |
PT_PER_PC
The constant PT_PER_PC contains the number of points per pica. |
| Method Summary | |
|---|---|
static int |
getChar(java.lang.CharSequence seq,
Count index)
Get the next character from a character sequence. |
static long |
getFloat(java.lang.CharSequence seq,
Count index)
Scan a floating point number from a character sequence. |
static long |
getLength(java.lang.CharSequence seq,
Count index)
Parse a character sequence for a length and return it in sp. |
static void |
toPoint(FixedDimen d,
java.io.PrintStream out,
boolean strip)
This method produces a printable representation of a length in terms of PostScript points. |
static void |
toPoint(FixedDimen d,
java.lang.StringBuilder out,
boolean strip)
This method produces a printable representation of a length in terms of PostScript points. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CM100_PER_IN
public static final int POINT_PER_100_IN
public static final int PT_PER_PC
| Method Detail |
|---|
public static int getChar(java.lang.CharSequence seq,
Count index)
seq - the sequence to read fromindex - the index of the next character to read
public static long getFloat(java.lang.CharSequence seq,
Count index)
seq - the sequence to read fromindex - the index of the next character to read
public static long getLength(java.lang.CharSequence seq,
Count index)
throws java.lang.NumberFormatException
Examples
1sp .2 pt -3.4 mm
seq - the sequence to read fromindex - the index of the next character to read
java.lang.NumberFormatException - in case of a parsing error
public static void toPoint(FixedDimen d,
java.io.PrintStream out,
boolean strip)
d - the length to convertout - the target bufferstrip - indicator whether rounding to the next higher integral
number is desirable
public static void toPoint(FixedDimen d,
java.lang.StringBuilder out,
boolean strip)
d - the length to convertout - the target bufferstrip - indicator whether rounding to the next higher integral
number is desirable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||