Copyright ©1995 by NeXT Computer, Inc. All Rights Reserved.
5 |
Display PostScript
PostScript Operators |
This section summarizes the PostScript®operators. The following notation is used: |
Notation | Means | |
(Display) | Extensions that were made by Adobe Systems Incorporated and NeXTSTEP for the Display PostScript System. | |
(NeXTSTEP) | NeXTSTEP extensions to the Display PostScript System. | |
* | Use this operator only if you're bypassing the Application Kit. Your use of this operator within an application based on the Application Kit will conflict with the Kit's use. |
This summary is organized into groups of related operators. The format used is the same as in the PostScript Language Reference Manual. Also as in that manual, the operand and result names suggest their types. Names representing numbers sometimes suggest their purpose (such as angle or window); in operators implemented by NeXTSTEP, these names represent integers except for the following, which are real: |
Coordinates, usually named as (or ending in) x and y | ||
Widths and heights, usually so named | ||
Coverage, a measure of transparency in "alpha" operators | ||
Time (named secs, and measured in seconds) |
Several operators can optionally take an encoded number string as an operand, as indicated by numstring in the listing below. Use encoded number strings only when drawing to the screen. An application can use the global variable NXDrawingStatus to determine whether it's drawing to the screen. |
Compositing and Transparency Operators (NeXTSTEP) |
srcxsrcywidth height srcgstate |
destxdestyop | composite | |
composite rectangle in source graphics state with image in current window | ||
destxdestywidth height op | compositerect | |
composite rectangle of current color and coverage with image in current graphics state |
srcxsrcywidth height srcgstate |
destxdestydelta | dissolve | |
dissolve between area of window referred to by srcgstate and equal area of window referred to by current graphics state | ||
window | currentwindowalpha state | |
return information about how window's alpha values are stored |
x y width height proc0[... procn-1] |
string bool | readimage | |
read image's pixel values and pass to corresponding procedures | ||
x y width height matrix | sizeimage pixelswide pixelshigh bits/sample matrix multiproc ncolors get various parameters required for readimage to read the image |
pixelswide pixelshigh bits/sample matrix proc0[... procn] multiproc |
ncolors | alphaimage | |
render data and alpha information supplied by one or more procedures |
Instance Drawing Operators (NeXTSTEP) |
newinstance | remove instance drawing from current window |
bool | setinstance | |
turn instance-drawing mode on or off | ||
x y width height | hideinstance | |
remove instance drawing from rectangle |
Mouse and Cursor Operators (NeXTSTEP) |
eventnum | stilldown bool | |
test whether left/only mouse button is still down from mouse-down eventnum | ||
eventnum | rightstilldown bool | |
test whether right mouse button is still down from mouse-down eventnum | ||
window | currentmouse x y | |
return mouse location in base coordinates * |
buttondown bool | test whether left/only mouse button is down | ||
rightbuttondown bool | test whether right mouse button is down |
x y | setmouse | |
set mouse and cursor location | ||
dx dy | adjustcursor | |
adjust cursor location by (dx, dy) | ||
x y mx my | setcursor | |
set cursor to image with upper left at (x, y) and hot spot at offset (mx, my) from (x, y). |
hidecursor | remove cursor from screen | ||
showcursor | restore cursor to screen | ||
obscurecursor | remove cursor from screen until mouse moves | ||
revealcursor | restore cursor if still obscured |
bool context | setwaitcursorenabled | |
enable or disable wait cursor | ||
context | currentwaitcursorenabled bool return whether wait cursor is enabled |
x y width height leftbool rightbool |
insidebool userdata trectnum gstate settrackingrect set tracking rectangle in window referred to by gstate |
trectnum gstate | cleartrackingrect | |
clear tracking rectangle in gstate |
Event Operators (NeXTSTEP) |
mask window | seteventmask | |
set window's Server-level event mask * | ||
window | currenteventmask mask | |
return window's current Server-level event mask * |
type x y time flags window |
subType misc0 misc1 context | posteventbycontext bool | |
post event to specified context | ||
bool window | setsendexposed | |
set whether window-changed events are generated for exposed window areas * | ||
bool | setflushexposures | |
set whether window-exposed and screen-changed subevents are flushed * | ||
bool context | setwaitcursorenabled | |
enable or disable wait cursor operation | ||
context | currentwaitcursorenabled bool return status of wait cursor in context | |
context | setactiveapp | |
establish application having context as the active application* |
currentactiveapp context | return context of active application * |
Frame Buffer Operators (NeXTSTEP) |
countframebuffers count | return number of frame buffers in use |
fbnum | currentframebuffertransfer redproc greenproc blueproc grayproc return current transfer function for fbnum | |
index string | framebuffer name slot unit romid x y width height maxdepth provide information on specific frame buffer |
redproc greenproc blueproc |
grayproc fbnum | setframebuffertransfer | |
set the transfer function for fbnum |
Window Management Operators (NeXTSTEP) |
x y width height type | window window | |
create window and return its number * | ||
window | termwindow | |
remove window from screen list; cause eventual freeing * | ||
type window | setwindowtype | |
set window's type to type | ||
window | windowdevice | |
set device of current graphics state to window | ||
window | windowdeviceround | |
set device to window and round coordinate system to integer pixels |
currentwindow window | return window number of current device | ||
setexposurecolor | set exposure color for nonretained window of current graphics state | ||
flushgraphics | flush drawing in buffered window to screen |
place otherwindow window | orderwindow | |
order Above or Below otherwindow (0 for all) or Out of screen list * | ||
level window | setwindowlevel | |
set window tier for window to level | ||
window | currentwindowlevel level | |
return window tier for window |
frontwindow window | return frontmost window * |
x y width height window | placewindow | |
reposition and resize with intersecting pixels unchanged * | ||
x y window | movewindow | |
move lower left to screen coordinates (x, y) * | ||
window | currentwindowbounds x y width height return window's location and size in screen coordinates | |
x y place otherwindow | findwindow x' y' window bool | |
locate window under screen coordinates (x, y) and give base coordinates (or return false) | ||
bool window | setautofill | |
set whether exposure color fills window's exposed areas automatically | ||
dict window | setwindowdict | |
set window's dictionary * | ||
window | currentwindowdict dict | |
return window's dictionary * | ||
context | countscreenlist count | |
return number of windows in screen list that belong to context | ||
context | countwindowlist count | |
return number of windows that belong to context | ||
array context | screenlist subarray | |
return window numbers of all windows in screen list that belong to context | ||
array context | windowlist subarray | |
return window numbers of all windows that belong to context | ||
context window | setowner | |
set owning PostScript context of window to context | ||
window | currentowner context | |
return PostScript context that owns window | ||
window | currentdeviceinfo min max bool return window's sampling density and whether device is color | |
depth | setdefaultdepthlimit | |
set depth limit for new windows * |
currentdefaultdepthlimit depth return depth limit for new windows * |
window | currentwindowdepth depth | |
return window's depth * | ||
depth window | setwindowdepthlimit | |
set window's depth limit * | ||
window | currentwindowdepthlimit depth return window's depth limit * | |
dumplevel window | dumpwindow | |
report position and number of bytes of backing store for window * | ||
dumplevel context | dumpwindows | |
report position and number of bytes of backing store for all windows owned by context * |
statusdict Operators (NeXTSTEP) |
ostype int | return category of operating system (1=standalone, 3=UNIX®variant) | ||
osname string | return name of operating system |
Operand Stack Manipulation Operators |
any | pop | |
discard top element | ||
any1any2 | exch any2any1 | |
exchange top two elements | ||
any | dup any any | |
duplicate top element | ||
any1... anynn | copy any1... anynany1... anyn duplicate top n elements | |
anyn... any0n | index anyn... any0anyn | |
duplicate arbitrary element | ||
an-1... a0n j | roll a(j-1) mod n... a0an-1... aj mod n roll n elements up j times | |
| any1... anyn | clear | | |
discard all elements | ||
| any1... anyn | count | any1... anynn | |
count elements on stack |
mark mark | push mark on stack |
mark obj1... objn | cleartomark | |
discard elements down through mark | ||
mark obj1... objn | counttomark mark obj1... objnn count elements down to mark |
Arithmetic and Math Operators |
num1num2 | add sum | |
num1plus num2 | ||
num1num2 | div quotient | |
num1divided by num2 | ||
int1int2 | idiv quotient | |
integer divide | ||
int1int2 | mod remainder | |
int1mod int2 | ||
num1num2 | mul product | |
num1times num2 | ||
num1num2 | sub difference | |
num1minus num2 | ||
num1 | abs num2 | |
absolute value of num1 | ||
num1 | neg num2 | |
negative of num1 | ||
num1 | ceiling num2 | |
ceiling of num1 | ||
num1 | floor num2 | |
floor of num1 | ||
num1 | round num2 | |
round num1to nearest integer | ||
num1 | truncate num2 | |
remove fractional part of num1 | ||
num | sqrt real | |
square root of num | ||
num den | atan angle | |
arctangent of num/den in degrees | ||
angle | cos real | |
cosine of angle (degrees) | ||
angle | sin real | |
sine of angle (degrees) | ||
base exponent | exp real | |
raise base to exponent power | ||
num | ln real | |
natural logarithm (base e) | ||
num | log real | |
logarithm (base 10) |
rand int | generate pseudo-random integer |
int | srand | |
set random number seed |
rrand int | return random number seed |
Array Operators |
int | array array | |
create array of length int |
[ mark | start array construction |
mark obj0... objn-1 | ] array | |
end array construction | ||
array | length int | |
number of elements in array | ||
array index | get any | |
get array element indexed by index | ||
array index any | put | |
put any into array at index | ||
array index count | getinterval subarray | |
subarray of array starting at index for count elements | ||
array1index array2 | putinterval | |
replace subarray of array1starting at index by array2 | ||
array | aload a0... an-1array | |
push all elements of array on stack | ||
any0... anyn-1array | astore array | |
pop elements from stack into array | ||
array1array2 | copy subarray2 | |
copy elements of array1to initial subarray of array2 | ||
array proc | forall | |
execute proc for each element of array | ||
any0... anyn-1n | packedarray packedarray | |
create packed array consisting of specified n elements |
currentpacking bool | return array packing mode |
bool | setpacking | |
set current array packing mode for `{...}' syntax (true = packedarray) | ||
packedarray | length int | |
number of elements in packedarray | ||
packedarray index | get any | |
get packedarray element indexed by index | ||
packedarray index count | getinterval subarray | |
subarray of packedarray starting at index for count elements | ||
packedarray | aload a0... an-1packedarray | |
push all elements of packedarray on stack | ||
packedarray1array2 | copy subarray2 | |
copy elements of packedarray1to initial subarray of array2 | ||
packedarray proc | forall | |
execute proc for each element of packedarray |
Dictionary Operators |
int | dict dict | |
create dictionary with capacity for int elements | ||
dict | length int | |
number of key-value pairs in dict | ||
dict | maxlength int | |
capacity of dict | ||
dict | begin | |
push dict on dict stack |
end | pop dict stack |
key value | def | |
associate key and value in current dict | ||
key | load value | |
search dict stack for key and return associated value | ||
key value | store | |
replace topmost definition of key | ||
dict key | get any | |
get value associated with key in dict | ||
dict key value | put | |
associate key with value in dict |
cleardictstack | return dictionary stack to initial state |
dict key | known bool | |
test whether key is in dict | ||
key | where dict true | |
or false | find dict in which key is defined | |
dict1dict2 | copy dict2 | |
copy contents of dict1to dict2 | ||
dict proc | forall | |
execute proc for each element of dict |
errordict dict | push errordict on operand stack | ||
systemdict dict | push systemdict on operand stack | ||
userdict dict | push userdict on operand stack | ||
currentdict dict | push current dict on operand stack | ||
countdictstack int | count elements on dict stack |
array | dictstack subarray | |
copy dict stack into array |
String Operators |
int | string string | |
create string of length int | ||
string | length int | |
number of elements in string | ||
string index | get int | |
get string element indexed by index | ||
string index int | put | |
put int into string at index | ||
string index count | getinterval substring | |
substring of string starting at index for count elements | ||
string1index string2 | putinterval | |
replace substring of string1starting at index by string2 | ||
string1string2 | copy substring2 | |
copy elements of string1to initial substring of string2 | ||
string proc | forall | |
execute proc for each element of string | ||
string seek | anchorsearch post match true | |
or string false | determine if seek is initial substring of string | |
string seek | search post match pre true | |
or string false | search for seek in string | |
string | token post token true | |
or false | read token from start of string |
Relational, Boolean, and Bitwise Operators |
any1any2 | eq bool | |
test equal | ||
any1any2 | ne bool | |
test not equal | ||
num1| str1num2| str2 | ge bool | |
test greater or equal | ||
num1| str1num2| str2 | gt bool | |
test greater than | ||
num1| str1num2| str2 | le bool | |
test less or equal | ||
num1| str1num2| str2 | lt bool | |
test less than | ||
bool1| int1bool2| int2 | and bool3| int3 | |
logical | bitwise and | ||
bool1| int1 | not bool2| int2 | |
logical | bitwise not | ||
bool1| int1bool2| int2 | or bool3| int3 | |
logical | bitwise inclusive or | ||
bool1| int1bool2| int2 | xor bool3| int3 | |
logical | bitwise exclusive or |
true true | push boolean value true | ||
false false | push boolean value false |
int1shift | bitshift int2 | |
bitwise shift of int1(positive is left) |
Rectangle Operators (Display) |
x y width height | rectfill | |
numarray | rectfill | |
numstring | rectfill | |
fill path consisting of one or more rectangles | ||
x y width height | rectstroke | |
x y width height matrix | rectstroke | |
numarray | rectstroke | |
numarray matrix | rectstroke | |
numstring | rectstroke | |
numstring matrix | rectstroke | |
stroke path consisting of one or more rectangles | ||
x y width height | rectclip | |
numarray | numstring | rectclip | |
intersect inside of current clipping path with supplied path |
Control Operators |
any | exec | |
execute arbitrary object | ||
bool proc | if | |
execute proc if bool is true | ||
bool proc1proc2 | ifelse | |
execute proc1if bool is true, proc2if bool is false | ||
init incr limit proc | for | |
execute proc with values from init by steps of incr to limit | ||
int proc | repeat | |
execute proc int times | ||
proc | loop | |
execute proc an indefinite number of times |
exit | exit innermost active loop | ||
stop | terminate stopped context |
any | stopped bool | |
establish context for catching stop |
countexecstack int | count elements on exec stack |
array | execstack subarray | |
copy exec stack into array |
quit | terminate interpreter | ||
start | executed at interpreter startup |
Type, Attribute, and Conversion Operators |
any | type name | |
return name identifying any's type | ||
any | cvlit any | |
make object be literal | ||
any | cvx any | |
make object be executable | ||
any | xcheck bool | |
test executable attribute | ||
array | packedarray | file | string | executeonly array | packedarray | file | string reduce access to execute-only |
array | packedarray | dict | file | string noaccess array | packedarray | dict | file | string |
disallow any access |
array | packedarray | dict | file | string readonly array | packedarray | dict | file | string |
reduce access to read-only |
array | packedarray | dict | file | string rcheck bool test read access
array | packedarray | dict | file | string wcheck bool test write access |
numstring | cvi int | |
convert to integer | ||
string | cvn name | |
convert to name | ||
numstring | cvr real | |
convert to real | ||
num radix string | cvrs substring | |
convert to string with radix | ||
any string | cvs substring | |
convert to string |
File Operators |
string1string2 | file file | |
open file identified by string1with access string2 | ||
string | deletefile | |
remove specified file from device | ||
string1string2 | renamefile | |
change file name from string1to string2 | ||
pattern proc scratch | filenameforall | |
process each file whose name matches pattern with proc | ||
file | closefile | |
close file | ||
file | read int true | |
or false | read one character from file | |
file int | write | |
write one character to file | ||
file string | readhexstring substring bool | |
read hex from file into string | ||
file string | writehexstring | |
write string to file as hex | ||
file string | readstring substring bool | |
read string from file | ||
file string | writestring | |
write characters of string to file | ||
file string | readline substring bool | |
read line from file into string | ||
file | token token true | |
or false | read token from file | |
file int | setfileposition | |
position next read or write in file to int | ||
file | fileposition int | |
return current position in already open file | ||
file | bytesavailable int | |
number of bytes available to read |
flush | send buffered data to standard output file |
file | flushfile | |
send buffered data or read to EOF | ||
file | resetfile | |
discard buffered characters | ||
file | status bool | |
return status of file | ||
string | status pages bytes referenced created true | |
or false | (Display) return status of file | |
string | run | |
execute contents of named file |
currentfile file | return file currently being executed |
string | ||
write characters of string to standard output file | ||
any | = | |
write text representation of any to standard output file | ||
| any1... anyn | stack | any1... anyn | |
print stack nondestructively using = | ||
any | == | |
write syntactic representation of any to standard output file | ||
| any1... anyn | pstack | any1... anyn | |
print stack nondestructively using == |
prompt | executed when ready for interactive input |
bool | echo | |
turn on/off echoing |
Structured Output Operators (Display) |
int | setobjectformat | |
set format for object sequences written by printobject and writeobject |
currentobjectformat int | return current object format used by printobject and writeobject |
obj tag | printobject | |
write binary object sequence to standard output file | ||
file obj tag | writeobject | |
write binary object sequence to file |
Virtual Memory Operators (Display) |
save save | create VM snapshot |
save | restore | |
restore VM snapshot | ||
dict key | undef | |
remove key and associated value from dict | ||
bool | setshared | |
set private or shared VM allocation mode |
currentshared bool | return current value of VM allocation mode |
any | scheck bool | |
return whether any is sharable | ||
int | vmreclaim | |
control garbage collection mode |
vmstatus level used maximum | report VM status |
Context Operators (Display) |
mark obj1... objnproc | fork context | |
create new context within private VM of current context | ||
context | join mark obj1... objn | |
when context ceases execution, push its operand stack onto current context's operand stack | ||
context | detach | |
cause context to terminate when it's done executing |
currentcontext context | return integer identifying current context | ||
lock lock | create lock | ||
condition condition | create condition object |
lock proc | monitor | |
acquire lock, execute proc, and then release lock | ||
lock condition | wait | |
release lock, wait for condition, and reacquire lock | ||
condition | notify | |
resume execution of contexts waiting for condition |
yield | suspend current context until other contexts sharing same VM have executed |
Miscellaneous Operators |
proc | bind proc | |
replace operator names in proc by operators | ||
index name | defineusername | |
(Display) associate index with name in user name table |
null null | push null on operand stack | ||
usertime int | (Display) return PostScript interpreter execution time | ||
realtime int | (Display) return value of clock that counts in real time | ||
version string | interpreter version | ||
nextrelease string | (NeXTSTEP) NeXTSTEP version information |
bool | setwriteblock | |
(NeXTSTEP) set whether Window Server blocks |
currentwriteblock bool | (NeXTSTEP) return whether Server blocks | ||
currentuser uid gid | (NeXTSTEP) return user id and group id of currently logged-in user |
currentrusage ctime utime stime msgsend msgrcv nsignals nvcsw nivcsw (NeXTSTEP) report Window Server's resource usage |
soundname priority | playsound | |
(NeXTSTEP) play soundname at given priority level |
Graphics State Operators |
gsave | save graphics state | ||
grestore | restore graphics state | ||
grestoreall | restore to bottommost graphics state | ||
initgraphics | (standard) reset graphics state parameters (NeXTSTEP) also reset alpha and instancing |
num | setlinewidth | |
set line width |
currentlinewidth num | return current line width |
int | setlinecap | |
set shape of line ends for stroke (0=butt, 1=round, 2=square) |
currentlinecap int | return current line cap |
int | setlinejoin | |
set shape of corners for stroke (0=miter, 1=round, 2=bevel) |
currentlinejoin int | return current line join |
num | setmiterlimit | |
set miter length limit |
currentmiterlimit num | return current miter limit |
array offset | setdash | |
set dash pattern for stroking |
currentdash array offset | return current dash pattern |
num | setflat | |
set flatness tolerance |
currentflat num | return current flatness |
patternname | setpattern | |
(NeXTSTEP) set pattern for drawing | ||
num | setgray | |
set color to gray value from 0 (black) to 1 (white) |
currentgray num | return current gray |
hue sat brt | sethsbcolor | |
set color given hue, saturation, brightness |
currenthsbcolor hue sat brt | return current color hue, saturation, brightness |
red green blue | setrgbcolor | |
set color given red, green, blue |
currentrgbcolor red green blue return current color red, green, blue |
coverage | setalpha | |
(NeXTSTEP) set current coverage |
currentalpha coverage | (NeXTSTEP) return current coverage setting |
cyan magenta yellow black | setcmykcolor | |
set current color parameter in graphics state |
currentcmykcolor cyan magenta yellow black return current color parameter in graphics state |
redproc greenproc |
blueproc grayproc | setcolortransfer | |
set current transfer function parameters for specified colors |
currentcolortransfer redproc greenproc blueproc grayproc return current transfer function parameters for specified colors |
proc | setblackgeneration | |
set current black generation function parameter in graphics state |
currentblackgeneration proc return current black generation function parameter in graphics state |
proc | setundercolorremoval | |
set current undercolor removal function parameter in graphics state |
currentundercolorremoval proc return current undercolor removal function parameter in graphics state |
redfrequency redangle redproc greenfrequency greenangle greenproc bluefrequency blueangle blueproc grayfrequency |
grayangle grayproc | setcolorscreen | |
set all twelve current halftone screen parameters in graphics state |
currentcolorscreen redfrequency redangle redproc greenfrequency greenangle greenproc bluefrequency blueangle blueproc grayfrequency grayangle grayproc return all twelve current halftone screen parameters in graphics state |
width height bits/sample matrix |
proc0[... procn] multiproc ncolors | colorimage | |
render sampled image with 1, 3, or 4 color values | ||
freq angle proc | setscreen | |
freq angle halftone | setscreen | |
set halftone screen |
currentscreen freq angle proc |
currentscreen 60 0 halftone | return current halftone screen or dictionary |
proc | settransfer | |
set gray transfer function |
currenttransfer proc | return current transfer function |
Graphics State Object Operators (Display) |
gstate gstate | create graphics state object |
gstate | setgstate | |
replace current graphics state by value of gstate | ||
gstate | currentgstate gstate | |
fill gstate with copy of current graphics state |
Halftone Definition Operators (Display) |
dict | sethalftone | |
establish dict as current halftone dictionary |
currenthalftone dict | return current halftone dictionary |
x y | sethalftonephase | |
(Display) set current halftone phase parameters |
currenthalftonephase x y | (Display) return current halftone phase parameters |
Coordinate System and Matrix Operators |
x y | basetocurrent x' y' | |
(NeXTSTEP) convert from base to current coordinate system | ||
x y | basetoscreen x' y' | |
(NeXTSTEP) convert from base to screen coordinate system | ||
x y | currenttobase x' y' | |
(NeXTSTEP) convert from current to base coordinate system | ||
x y | currenttoscreen x' y' | |
(NeXTSTEP) convert from current to screen coordinate system | ||
x y | screentobase x' y' | |
(NeXTSTEP) convert from screen to base coordinate system | ||
x y | screentocurrent x' y' | |
(NeXTSTEP) convert from screen to current coordinate system |
matrix matrix | create identity matrix | ||
initmatrix | set CTM to device default |
matrix | identmatrix matrix | |
fill matrix with identity transform | ||
matrix | defaultmatrix matrix | |
fill matrix with device default matrix | ||
matrix | currentmatrix matrix | |
fill matrix with CTM | ||
matrix | setmatrix | |
replace CTM by matrix | ||
txty | translate | |
translate user space by (tx, ty) | ||
txtymatrix | translate matrix | |
define translation by (tx, ty) | ||
sxsy | scale | |
scale user space by sxand sy | ||
sxsymatrix | scale matrix | |
define scaling by sxand sy | ||
angle | rotate | |
rotate user space by angle degrees | ||
angle matrix | rotate matrix | |
define rotation by angle degrees | ||
matrix | concat | |
replace CTM by matrix CTM | ||
matrix1matrix2matrix3 | concatmatrix matrix3 | |
fill matrix3with matrix1 matrix2 | ||
x y | transform x' y' | |
transform (x, y) by CTM | ||
x y matrix | transform x' y' | |
transform (x, y) by matrix | ||
dx dy | dtransform dx' dy' | |
transform distance (dx, dy) by CTM | ||
dx dy matrix | dtransform dx' dy' | |
transform distance (dx, dy) by matrix | ||
x' y' | itransform x y | |
inverse transform (x', y') by CTM | ||
x' y' matrix | itransform x y | |
inverse transform (x', y') by matrix | ||
dx' dy' | idtransform dx dy | |
inverse transform distance (dx', dy') by CTM | ||
dx' dy' matrix | idtransform dx dy | |
inverse transform distance (dx', dy') by matrix | ||
matrix1matrix2 | invertmatrix matrix2 | |
fill matrix2with inverse of matrix1 |
Path Construction Operators |
newpath | initialize current path to be empty | ||
currentpoint x y | return current point coordinate |
x y | moveto | |
set current point to (x, y) | ||
dx dy | rmoveto | |
relative moveto | ||
x y | lineto | |
append straight line to (x, y) | ||
dx dy | rlineto | |
relative lineto | ||
x y r ang1ang2 | arc | |
append counterclockwise arc | ||
x y r ang1ang2 | arcn | |
append clockwise arc | ||
x1y1x2y2r | arcto xt1yt1xt2yt2 | |
append tangent arc | ||
x1y1x2y2x3y3 | curveto | |
append Bezier cubic section | ||
dx1dy1dx2dy2dx3dy3 | rcurveto | |
relative curveto |
closepath | connect subpath back to its starting point | ||
flattenpath | convert curves to sequences of straight lines | ||
reversepath | reverse direction of current path | ||
strokepath | compute outline of stroked path |
string bool | charpath | |
append character outline to current path |
clippath | set current path to clipping path | ||
pathbbox llxllyurxury | return bounding box of current path |
move line curve close | pathforall | |
enumerate current path |
initclip | set clipping path to device default | ||
clip | establish new clipping path | ||
eoclip | clip using even-odd inside rule |
User Path Operators (Display) |
llxllyurxury | setbbox | |
establish bounding box for current path | ||
x1y1x2y2r | arct | |
append arc of circle to current path | ||
userpath | uappend | |
append userpath to current path | ||
bool | upath userpath | |
create userpath as copy of current path | ||
userpath | ufill | |
fill userpath as if by using fill operator | ||
userpath | ueofill | |
fill userpath as if by using eofill operator | ||
userpath | ustroke | |
userpath matrix | ustroke | |
stroke userpath as if by using stroke operator | ||
userpath | ustrokepath | |
userpath matrix | ustrokepath | |
replace current path with userpath and stroke result |
ucache | store enclosing user path if not already stored |
ucachestatus mark bsize bmax rsize rmax blimit | ||
report status of user path cache |
mark blimit | setucacheparams | |
set user path cache parameters |
View Clip Operators (Display) |
viewclip | replace view clipping path with copy of current path | ||
eoviewclip | replace view clipping path with current path using even-odd inside rule |
x y width height | rectviewclip | |
numarray numstring | rectviewclip | |
replace view clipping path with specified path |
viewclippath | replace path with copy of current view clipping path | ||
initviewclip | replace view clipping path with one equal to imageable area |
Painting Operators |
erasepage | (NeXTSTEP) erase entire window to opaque white (standard) paint current page white | ||
fill | fill current path with current color | ||
eofill | fill using even-odd rule | ||
stroke | draw line along current path |
width height bits/sample matrix proc image render sampled image onto current page |
width height invert matrix proc | imagemask | |
render mask onto current page |
Window System Support Operators (Display) |
wtranslation x y | return translation from window origin to device space origin |
x y | infill bool | |
userpath | infill bool | |
return true if pixel at (x, y) (or any pixels in userpath) would be painted by fill of current path | ||
x y | ineofill bool | |
userpath | ineofill bool | |
return true if pixel at (x, y) (or any pixels in userpath) would be painted by eofill of current path | ||
x y userpath | inufill bool | |
userpath1userpath2 | inufill bool | |
return true if pixel at (x, y) (or any pixels in userpath1) would be painted by ufill of current path | ||
x y userpath | inueofill bool | |
userpath1userpath2 | inueofill bool | |
return true if pixel at (x, y) (or any pixels in userpath1) would be painted by ueofill of current path | ||
x y | instroke bool | |
userpath | instroke bool | |
return true if pixel at (x, y) (or any pixels in userpath) would be painted by stroke of current path | ||
x y userpath | inustroke bool | |
x y userpath matrix | inustroke bool | |
userpath1userpath2 | inustroke bool | |
userpath1userpath2matrix | inustroke bool | |
return true if pixel at (x, y) (or any pixels in userpath1) would be painted by ustroke of current path |
deviceinfo dict | return dict containing static information about current device |
Device Setup and Output Operators |
proc window | setshowpageprocedure | |
set the procedure that's executed during showpage | ||
window | currentshowpageprocedure proc return the procedure that's executed during showpage |
showpage | output and reset current page | ||
copypage | output current page | ||
nulldevice | install no-output device |
width height bbox matrix hostname portname pixelencoding machportdevice (NeXTSTEP) set up PostScript device for generic rendering service |
Scan Conversion Operators (Display) |
bool | setstrokeadjust | |
turn automatic stroke adjustment on or off |
currentstrokeadjust bool | return current state of automatic stroke adjustment |
Character and Font Operators |
key font | definefont font | |
register font as font dictionary | ||
key | undefinefont | |
(Display) remove key from FontDirectory dictionary | ||
key | findfont font | |
return font dict identified by key | ||
font scale | scalefont font' | |
scale font by scale to produce new font' | ||
font matrix | makefont font' | |
transform font by matrix to produce new font' | ||
font | setfont | |
set font dictionary |
currentfont font | return current font dictionary |
string | show | |
print characters of string on page | ||
axaystring | ashow | |
add (ax, ay) to width of each char while showing string | ||
text numarray | numstring | xyshow | |
(Display) print characters according to x, y displacements in numarray or numstring | ||
text numarray | numstring | xshow | |
(Display) print characters according to x displacements in numarray or numstring | ||
text numarray | numstring | yshow | |
(Display) print characters according to y displacements in numarray or numstring | ||
cxcychar string | widthshow | |
add (cx, cy) to width of char while showing string | ||
cxcychar axaystring | awidthshow | |
combine effects of ashow and widthshow | ||
proc string | kshow | |
execute proc between characters shown from string | ||
string | stringwidth wxwy | |
width of string in current font |
FontDirectory dict | dictionary of font dictionaries | ||
SharedFontDirectory dict | (Display) dictionary of font dictionaries | ||
NextStepEncoding array | NeXTSTEP font encoding vector | ||
StandardEncoding array | standard font encoding vector |
key scale | matrix | selectfont | |
(Display) establish font specified by key as current font |
Font Cache Operators |
cachestatus bsize bmax msize mmax csize cmax blimit return cache status and parameters |
wxwyllxllyurxury | setcachedevice | |
declare cached character metrics | ||
wxwy | setcharwidth | |
declare uncached character metrics | ||
num | setcachelimit | |
set max bytes in cached character | ||
mark size lower upper | setcacheparams | |
set character cache parameters |
currentcacheparams mark lower upper return current font cache parameters |
User Object Encoding Operators (Display) |
index any | defineuserobject | |
associate index with an object in the user object array | ||
index | undefineuserobject | |
remove associate between index and the object it referred to | ||
index | execuserobject | |
execute object referred to by index |
Errors |
dictfull | no more room in dictionary | |
dictstackoverflow | too many begins | |
dictstackunderflow | too many ends | |
execstackoverflow | exec nesting too deep | |
handleerror | called to report error information | |
interrupt | external interrupt request (e.g., Control-C) | |
invalidaccess | attempt to violate access attribute | |
invalidcontext | invalid use of context synchronization facilities | |
invalidexit | exit not in loop | |
invalidfileaccess | unacceptable access string | |
invalidfont | invalid font name or dict | |
invalidrestore | improper restore | |
invalidid | (Display) invalid identifying number as operand | |
ioerror | input/output error occurred | |
limitcheck | implementation limit exceeded | |
nocurrentpoint | current point is undefined | |
rangecheck | operand out of bounds | |
stackoverflow | operand stack overflow | |
stackunderflow | operand stack underflow | |
syntaxerror | syntax error in PS program | |
timeout | time limit exceeded | |
typecheck | operand of wrong type | |
undefined | name not known | |
undefinedfilename | file not found | |
undefinedresult | over/underflow or meaningless result | |
unmatchedmark | expected mark not on stack | |
unregistered | internal error | |
VMerror | VM exhausted |