org.foray.ps
Class PsSystemDict4a

java.lang.Object
  extended by org.foray.ps.PsObjectComposite
      extended by org.foray.ps.PsDictionary
          extended by org.foray.ps.PsSystemDict4a
All Implemented Interfaces:
org.axsl.ps.PsSystemDict, PsObject
Direct Known Subclasses:
Java2DSystemDict, PDFSystemDict, ReadOnlySystemDict

public abstract class PsSystemDict4a
extends PsDictionary
implements org.axsl.ps.PsSystemDict

The PostScript System Dictionary.


Field Summary
 
Fields inherited from class org.foray.ps.PsDictionary
DEFAULT_FONT_DICTIONARY_SIZE
 
Constructor Summary
PsSystemDict4a()
          Constructor.
 
Method Summary
protected abstract  void closepathDevice()
          Executes any implementation-specific operations related to "closepath".
protected abstract  void curvetoDevice(double x1, double y1, double x2, double y2, double x3, double y3)
          Executes any implementation-specific operations related to "curveto".
protected  boolean execute(PsName nameObject)
          Tries to execute an executable object.
protected  boolean executeOperator(PsOperator operatorEnum)
          Executes a given operator.
protected abstract  void fillDevice()
          Executes any implementation-specific operations related to "fill".
protected abstract  void linetoDevice(PsNumber x, PsNumber y)
          Executes any implementation-specific operations related to "lineto".
protected abstract  void movetoDevice(PsNumber x, PsNumber y)
          Executes any implementation-specific operations related to "moveto".
protected abstract  void newpathDevice()
          Executes any implementation-specific operations related to "newpath".
protected abstract  void setcmykcolorDevice(float cyan, float magenta, float yellow, float black)
          Executes any implementation-specific operations related to "setcmykcolor".
protected abstract  void setgrayDevice(float grayValue)
          Executes any implementation-specific operations related to "setgray".
protected abstract  void setrgbcolorDevice(float red, float green, float blue)
          Executes any implementation-specific operations related to "setrgbcolor".
protected abstract  void strokeDevice()
          Executes any implementation-specific operations related to "stroke".
 
Methods inherited from class org.foray.ps.PsDictionary
addItem, duplicate, execute, getBoolean, getItem, getItem, getMap, getName, getNumber, getString, getTypeName, isComparable, isComposite, isExecutable, isValidFontDictionary, maxLength, size
 
Methods inherited from class org.foray.ps.PsObjectComposite
getAccess, setAccess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.axsl.ps.PsSystemDict
getOutput
 

Constructor Detail

PsSystemDict4a

public PsSystemDict4a()
Constructor.

Method Detail

execute

protected boolean execute(PsName nameObject)
                   throws PsOperatorException,
                          PsInterpreterException4a
Tries to execute an executable object.

Parameters:
nameObject - The PsName instance that should be executed.
Returns:
True if the operation was found and executed, otherwise, false.
Throws:
PsOperatorException - For errors during execution.
PsInterpreterException4a - For PostScript errors during execution.

executeOperator

protected boolean executeOperator(PsOperator operatorEnum)
                           throws PsOperatorException,
                                  PsInterpreterException4a
Executes a given operator.

Overrides:
executeOperator in class PsDictionary
Parameters:
operatorEnum - The enumerated value of the operator to be executed.
Returns:
True iff this dictionary contains the given operator.
Throws:
PsOperatorException - For PostScript errors during execution.
PsInterpreterException4a - For PostScript errors during execution.

setcmykcolorDevice

protected abstract void setcmykcolorDevice(float cyan,
                                           float magenta,
                                           float yellow,
                                           float black)
                                    throws PsDeviceException
Executes any implementation-specific operations related to "setcmykcolor".

Parameters:
cyan - The cyan channel value to set (0.0 through 1.0).
magenta - The magenta channel value to set (0.0 through 1.0).
yellow - The yellow channel value to set (0.0 through 1.0).
black - The black channel value to set (0.0 through 1.0).
Throws:
PsDeviceException - For errors in device-specific code.

setrgbcolorDevice

protected abstract void setrgbcolorDevice(float red,
                                          float green,
                                          float blue)
                                   throws PsDeviceException
Executes any implementation-specific operations related to "setrgbcolor".

Parameters:
red - The red channel value to set (0.0 through 1.0).
green - The green channel value to set (0.0 through 1.0).
blue - The blue channel value to set (0.0 through 1.0).
Throws:
PsDeviceException - For errors in device-specific code.

setgrayDevice

protected abstract void setgrayDevice(float grayValue)
                               throws PsDeviceException
Executes any implementation-specific operations related to "setgray".

Parameters:
grayValue - The value of the gray color to set. This is a value between 0 (black) and 1 (white).
Throws:
PsDeviceException - For errors in device-specific code.

newpathDevice

protected abstract void newpathDevice()
                               throws PsDeviceException
Executes any implementation-specific operations related to "newpath".

Throws:
PsDeviceException - For errors in device-specific code.

movetoDevice

protected abstract void movetoDevice(PsNumber x,
                                     PsNumber y)
                              throws PsDeviceException
Executes any implementation-specific operations related to "moveto".

Parameters:
x - The new "x" position.
y - The new "y" position.
Throws:
PsDeviceException - For errors in device-specific code.

closepathDevice

protected abstract void closepathDevice()
                                 throws PsDeviceException
Executes any implementation-specific operations related to "closepath".

Throws:
PsDeviceException - For errors in device-specific code.

linetoDevice

protected abstract void linetoDevice(PsNumber x,
                                     PsNumber y)
                              throws PsDeviceException
Executes any implementation-specific operations related to "lineto".

Parameters:
x - The new "x" position, that is, for the end-point of the line segment added.
y - The new "y" position, that is, for the end-point of the line segment added.
Throws:
PsDeviceException - For errors in device-specific code.

curvetoDevice

protected abstract void curvetoDevice(double x1,
                                      double y1,
                                      double x2,
                                      double y2,
                                      double x3,
                                      double y3)
                               throws PsDeviceException
Executes any implementation-specific operations related to "curveto".

Parameters:
x1 - The "x" position for control point 1.
y1 - The "y" position for control point 1.
x2 - The "x" position for control point 2.
y2 - The "y" position for control point 2.
x3 - The "x" position for control point 3.
y3 - The "y" position for control point 3.
Throws:
PsDeviceException - For errors in device-specific code.

fillDevice

protected abstract void fillDevice()
                            throws PsDeviceException
Executes any implementation-specific operations related to "fill".

Throws:
PsDeviceException - For errors in device-specific code.

strokeDevice

protected abstract void strokeDevice()
                              throws PsDeviceException
Executes any implementation-specific operations related to "stroke".

Throws:
PsDeviceException - For errors in device-specific code.


Copyright © 2017. All rights reserved.