Important: The information in this document is obsolete and should not be used for new development.
Picture Comments to AvoidThe
SetGrayLevelpicture comment is now obsolete. The
ResourcePSpicture comments have limited use and are not recommended. This section describes the shortcomings of these picture comments.
SetGrayLevelpicture comment was designed to provide access to the PostScript
setgrayoperator while drawing with QuickDraw in black-and-white mode. For most drawing operations, however, the printer driver sets the gray level to match the foreground color for the printing graphics port, and the effect of the
SetGrayLevelpicture comment is often unpredictable. If direct access to the PostScript
setgrayoperator seems desirable, it is preferable to send the instruction with the
TextIsPostScriptpicture comment interprets all the text manipulated with QuickDraw text-drawing routines (namely,
DrawText, and anything else that calls the
StdTextlow-level procedure) as PostScript code. There is no good reason to use this picture comment, but there is one important reason not to use it: printer drivers that do not support the
TextIsPostScriptpicture comment will print the PostScript text instead of interpreting it. If you need to transmit PostScript code directly to a printer that understands it, use the
PostScriptHandlecomment and include a QuickDraw representation for all other printer drivers.
ResourcePSpicture comment loads PostScript code from a resource file. The resource file is expected to be open at the time that you use
ResourcePS. Under background printing, there are no guarantees the resource file will still be open when the Printing Manager needs it. If you want to keep PostScript code in a resource file, it is easy to write a routine that loads the resources and sends their contents using the
PostScriptFilepicture comment loads PostScript code from a file; as with the
ResourcePScomment, there are no guarantees the file will be open when the Printing Manager needs it during background printing. If you want to keep PostScript code in a file, it is easy to write a routine that loads the file and its contents using the
As with the
PostScriptBeginpicture comment, the
PSBeginNoSavepicture comment allows applications to change the state of a PostScript printer driver. Some applications do not want to restore the previous state of the PostScript interpreter after sending PostScript code; the
PSBeginNoSavecomment was intended for situations where applications do not want to preserve the printer state. However, the
PSBeginNoSavepicture comment allows applications to interfere with the LaserWriter 8.0 printer driver, and the driver, by calling the PostScript operator
grestore, can interfere with the application. The use of
PSBeginNoSavecan lead to incorrect clipping, incorrect colors, and PostScript language errors and should therefore be avoided.
By default, most drivers apply about 80 percent of the total line layout error to the major glyphs (the space character) and the other 20 percent to the minor glyphs (all other glyphs). (When using a script system that does not use the space glyph to delimit words, the layout error is distributed evenly across all characters in the font.) The
ClientLineLayoutpicture comment allows applications to redefine the major glyph, and the percentages of the line layout error assigned to the major and minor glyphs. The
ClientLineLayoutpicture comment is rather subtle and very specific to the PostScript LaserWriter driver. Only very ambitious page layout applications might be interested in this functionality, however; their designers should instead aim at a more general scheme of line layout control that does not rely upon this very driver-specific picture comment.
Intended for printing forms on PostScript LaserWriter printers, the
FormsPrintingpicture comment directs the PostScript LaserWriter driver not to clear its page buffer after printing a page. The
EndFormsPrintingpicture comment directs the PostScript LaserWriter driver to clear its page buffer after printing a page. When a page is completed, applications must erase the areas that need to be updated and draw the new information. The graphics that make up the form are drawn only once per page, which may improve performance. However, you need to write a separate printing loop for the PostScript LaserWriter driver if you want to use this comment.