Postscript Operators 'w'




wait lock condition wait - DPS

releases lock, waits for condition to be notified by some other execution

context, and finally reacquires lock. The lock must originally have been acquired by the current context, which means that wait can be invoked only within the execution of a monitor that references the same lock .

If lock is initially held by some other context or is not held by any context, wait executes an invalidcontext error. On the other hand, during the wait for condition, the lock can be acquired by some other context. After condition is notified, wait will wait an arbitrary length of time to reacquire lock.

If the current context has previously executed a save not yet matched by a restore, wait executes invalidcontext unless both lock and condition are in global VM. The latter case is permitted under the assumption that the wait is synchronizing with some context whose local VM is different from that of the current context.


ERRORS: invalidcontext, stackunderflow, typecheck

SEE ALSO: condition, lock, monitor, notify

Troubleshooting index Postscript Index


wcheck array wcheck bool
packedarray wcheck false
dict wcheck bool
file wcheck bool
string wcheck bool

tests whether the operand's access permits its value to be written explicitly by PostScript operators.
wcheck returns true if the operand's access is unlimited, false otherwise.


ERRORS: stackunderflow, typecheck

SEE ALSO: rcheck, readonly, executeonly, noaccess

Troubleshooting index Postscript Index


where key where dict true (if found)
false (if not found)

determines which dictionary on the dictionary stack, if any, contains an entry whose key is key. where searches for key in each dictionary on the dictionary stack, starting with the topmost (current) dictionary. If key is found in some dictionary, where returns that dictionary object and the boolean true. If key is not found in any dictionary on the dictionary stack, where simply returns false.

ERRORS: invalidaccess, stackoverflow, stackunderflow, typecheck

SEE ALSO: known, load, get

Troubleshooting index Postscript Index


widthshow cx cy char string widthshow

- paints the characters of string in a manner similar to show. But while doing so, widthshow adjusts the width of each occurrence of the character char by adding cx to its x width and cy to its y width, thus modifying the spacing between it and the next character. char is an integer used as a character code. This operator enables fitting a string of text to a specific width by adjusting the width of all occurrences of some specific character, such as the space character.

For a base font, char is simply an integer in the range 0 to 255 compared to successive elements of string. For a composite font, char is compared to an integer computed from the font mapping algorithm. The font number, f, and character code, c, that are selected by the font mapping algorithm are combined into a single integer according to the FMapType of the immediate parent of the selected base font.
For FMapType values of 4 and 5, the integer value is (f x 128) + c;
for all other FMapType values, it is (f x 256) + c.

EXAMPLE:
/Helvetica findfont 12 scalefont setfont
14 60 moveto (Normal spacing) show
14 46 moveto 6 0 8#040 (Wide word spacing) widthshow

ERRORS: invalidaccess, invalidfont, nocurrentpoint, stackunderflow, typecheck, rangecheck

SEE ALSO: show, ashow, awidthshow, kshow, xshow, yshow, xyshow, stringwidth

Troubleshooting index Postscript Index


write file int write

- appends a single character to the output file file. The int operand should be an integer in the range 0 to 255 representing a character code (values outside this range are reduced modulo 256). If file is not a valid output file or some error is encountered, write executes ioerror.

As is the case for all operators that write to files, the output produced by write may accumulate in a buffer instead of being transmitted immediately. To ensure immediate transmission, a flushfile is required.

ERRORS: invalidaccess, ioerror, stackunderflow, typecheck

SEE ALSO: read, writehexstring, writestring, file

Troubleshooting index Postscript Index


writehexstring file string writehexstring

- writes all of the characters of string to file as hexadecimal digits.

For each element of string (an integer in the range 0 to 255), writehexstring appends a two-digit hexadecimal number composed of the characters 0 through 9 and a through f.

(%stdout)(w) file (abz) writehexstring
writes the six characters 61627a to the standard output file.

As is the case for all operators that write to files, the output produced by writehexstring may accumulate in a buffer instead of being transmitted immediately. To ensure immediate transmission, a flushfile is required.

ERRORS: invalidaccess, ioerror, stackunderflow, typecheck

SEE ALSO: readhexstring, write, writestring, file, filter

Troubleshooting index Postscript Index


writeobject file obj tag writeobject - LEVEL 2

writes a binary object sequence to file. Except for taking an explicit file operand, writeobject is identical to printobject in all respects.

As is the case for all operators that write to files, the output produced by writeobject may accumulate in a buffer instead of being transmitted immediately. To ensure immediate transmission, a flushfile is required.

ERRORS: invalidaccess, ioerror, limitcheck, rangecheck, stackunderflow, typecheck , undefined

SEE ALSO: printobject, setobjectformat

Troubleshooting index Postscript Index


writestring file string writestring -
writes the characters of string to the output file file. writestring does not append a newline character or interpret the value of string, which can contain arbitrary binary data. However, the communication channel may usurp certain control characters or impose other restrictions.

As is the case for all operators that write to files, the output produced by writestring may accumulate in a buffer instead of being transmitted immediately. To ensure immediate transmission, a flushfile is required.

ERRORS: invalidaccess, ioerror, stackunderflow, typecheck

SEE ALSO: readstring, write, writehexstring, file, filter

Troubleshooting index Postscript Index


wtranslation - wtranslation x y DPS

returns the translation from the window origin to the PostScript interpreter's device space origin. The integers x and y are the amounts that need to be added to a window system coordinate to produce the device space coordinate for the same position.
That coordinate may in turn be transformed to user space by the itransform operator. Window system and device space coordinates always correspond in resolution and orientation; they differ only in the positions of their origins. The translation from one origin to the other may change as windows are moved and resized. The precise behavior is window system specific.

ERRORS: stackoverflow

Troubleshooting index Postscript Index



Original file name: PSL2w.html