|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.ps.PsInterpreter4a
public class PsInterpreter4a
A generic PostScript interpreter.
This interpreter can be used in wide variety of different processing environments by creating
approprate subclasses of PsSystemDict4a
.
Field Summary | |
---|---|
static byte |
CARRIAGE_RETURN
The PostScript "carriage-return" character. |
static byte[] |
DELIMITER
The PostScript delimiters. |
static byte |
FORM_FEED
The PostScript "form-feed" character. |
static byte |
LEFT_ANGLE
The PostScript "left angle" character. |
static byte |
LEFT_BRACKET
The PostScript "left bracket" character. |
static byte |
LEFT_CURLY
The PostScript "left curly" character. |
static byte |
LEFT_PAREN
The PostScript "left parentheses" character. |
static byte |
LINE_FEED
The PostScript "line-feed" character. |
static int |
MAX_ARRAY_SIZE
The maximum PostScript array size. |
static byte |
MINUS_SIGN
The PostScript "minus" character. |
static byte[] |
NEWLINE
The PostScript new-line possibilities. |
static byte |
NULL
The PostScript "null" character. |
static byte |
PERCENT
The PostScript "percent" character. |
static byte |
PLUS_SIGN
The PostScript "plus" character. |
static byte |
RIGHT_ANGLE
The PostScript "right angle" character. |
static byte |
RIGHT_BRACKET
The PostScript "right bracket" character. |
static byte |
RIGHT_CURLY
The PostScript "right curly" character. |
static byte |
RIGHT_PAREN
The PostScript "right parentheses" character. |
static byte[] |
SIGN_INDICATOR
The PostScript sign indicators. |
static byte |
SLASH
The PostScript "slash" character. |
static byte |
SPACE
The PostScript "space" character. |
static byte |
TAB
The PostScript "tab" character. |
static byte[] |
WHITESPACE
The PostScript whitespace characters. |
Constructor Summary | |
---|---|
PsInterpreter4a(org.axsl.ps.PsInput input,
PsSystemDict4a systemDict)
Constructor for a PostScript interpreter. |
Method Summary | |
---|---|
protected PsObject |
find(PsObject key)
Find an object, searching through the dictionary stack until the object is found. |
PsObject |
find(String key)
Convenience method for external users of the interpreter. |
int |
getCurrentColumn()
Returns the current column number in the file being processed. |
int |
getCurrentLine()
Returns the current line number in the file being processed. |
PsDictionaryStack |
getDictionaryStack()
Returns the dictionary stack. |
PsExecutionStack |
getExecutionStack()
Returns the execution stack. |
PsFontDirectory4a |
getFontDirectory()
Returns the font dictionary. |
PsGraphicsState |
getGraphicsState()
Returns the current graphics state. |
PsGraphicsStateStack |
getGraphicsStateStack()
Returns the graphics state stack. |
protected PsDictionary |
getInternalDict()
Returns the internal dictionary. |
PsOperandStack |
getOperandStack()
Returns the operand stack. |
boolean |
getPackingMode()
Returns the packing mode. |
PsDictionary |
getSystemDict()
Returns the system dictionary. |
void |
process()
|
void |
processItem()
Processes the top item on the execution stack. |
void |
setPackingMode(boolean newPackingMode)
Sets the packing mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte NULL
public static final byte TAB
public static final byte LINE_FEED
public static final byte FORM_FEED
public static final byte CARRIAGE_RETURN
public static final byte SPACE
public static final byte LEFT_PAREN
public static final byte RIGHT_PAREN
public static final byte LEFT_ANGLE
public static final byte RIGHT_ANGLE
public static final byte LEFT_BRACKET
public static final byte RIGHT_BRACKET
public static final byte LEFT_CURLY
public static final byte RIGHT_CURLY
public static final byte SLASH
public static final byte PERCENT
public static final byte PLUS_SIGN
public static final byte MINUS_SIGN
public static final byte[] WHITESPACE
public static final byte[] NEWLINE
public static final byte[] DELIMITER
public static final byte[] SIGN_INDICATOR
public static final int MAX_ARRAY_SIZE
Constructor Detail |
---|
public PsInterpreter4a(org.axsl.ps.PsInput input, PsSystemDict4a systemDict) throws PsInterpreterException4a
input
- The PsInput instance that should be used as standard input
to the interpreter.systemDict
- The dictionary that should be used.
PsInterpreterException4a
- For invalid parameters.Method Detail |
---|
public void process() throws PsInterpreterException4a
process
in interface org.axsl.ps.PsInterpreter
PsInterpreterException4a
public void processItem() throws PsOperatorException, PsInterpreterException4a
PsOperatorException
- For errors executing operators.
PsInterpreterException4a
- For any PostScript error.protected PsObject find(PsObject key)
key
- The key to the object desired.
key
, or null if it is not
found in any dictionary.public PsObject find(String key)
key
- String containing the name of the item to be found.
public PsDictionary getSystemDict()
public PsFontDirectory4a getFontDirectory()
getFontDirectory
in interface org.axsl.ps.PsInterpreter
protected PsDictionary getInternalDict()
public PsExecutionStack getExecutionStack()
public PsOperandStack getOperandStack()
public PsDictionaryStack getDictionaryStack()
public PsGraphicsStateStack getGraphicsStateStack()
public PsGraphicsState getGraphicsState()
public boolean getPackingMode()
public void setPackingMode(boolean newPackingMode)
newPackingMode
- The new packing mode.public int getCurrentLine()
public int getCurrentColumn()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |