Important: The information in this document is obsolete and should not be used for new development.
PicCommentTo insert a picture comment into a picture that you are defining or into your printing code, use the
PROCEDURE PicComment (kind,dataSize:\xDDInteger; dataHandle:\xDDHandle);
- The type of comment. Because the vast majority of picture comments are interpreted by printer drivers, the constants that you can supply in this parameter--and values they represent--are listed in Appendix B, "Using Picture Comments for Printing," in this book.
- Size of any additional data passed in the
dataHandleparameter. Data sizes for the various kinds of picture comments are listed in Appendix B, "Using Picture Comments for Printing," in this book. If no additional data is used, specify 0 in this parameter.
A handle to additional data, if used. If no additional data is used, specify
NILin this parameter.
DESCRIPTIONWhen used after your application begins creating a picture with the
OpenPicture) function, the
PicCommentprocedure inserts the specified comment into the
Picturerecord. When sent to a printer driver after your application uses the
PicCommentpasses the data or commands in the specified comment directly to the printer.
Picture comments contain data or commands for special processing by output devices, such as printers. For example, using the
SetLineWidthcomment, your application can draw hairlines--which are not available with standard QuickDraw calls--on any PostScript LaserWriter printer and on the QuickDraw LaserWriter SC printer.
Usually printer drivers process picture comments, but applications can also do so. For your application to process picture comments, it must replace the
StdCommentprocedure pointed to by the
commentProcfield of the
QDProcsrecord, which in turn is pointed to by the
grafProcsfield of a
GrafPortrecord. The default
StdCommentprocedure provided by QuickDraw does no comment processing whatsoever. You can use the
SetStdCProcsprocedure to assist you in changing the
CQDProcsrecord, and you can use the
SetStdProcsprocedure to assist you in changing the
If you create and process your own picture comments, you should define comments so that they contain information that identifies your application (to avoid using the same comments as those used by Apple or by other third-party products). You should define a comment as an
ApplicationCommentcomment type with a
kindvalue of 100. The first 4 bytes of the data for the comment should specify your application's signature. (See the chapter "Finder Interface" in Inside Macintosh: Macintosh Toolbox Essentials for information about application signatures.) You can use the next 2 bytes to identify the type of comment--that is, to specify a
kindvalue to your own application.
Suppose your application signature were
'WAVE', and you wanted to use the value 128 to identify a
kindvalue to your own application. You would supply values to the
'WAVE'[4 bytes] + 128 [2 bytes] + additional data [n bytes]
Your application can then parse the first 6 bytes of the comment to determine whether and how to process the rest of the data in the comment. It is up to you to publish information about your comments if you wish them to be understood and used by other applications.
SPECIAL CONSIDERATIONSThese former picture comments are now obsolete:
PicCommentprocedure may move or purge memory.
SEE ALSOSee Appendix B, "Using Picture Comments for Printing," in this book for information about using picture comments to print with features that are unavailable with QuickDraw. See the chapter "QuickDraw Drawing" in this book for information about the
QDProcsrecord and the
SetStdProcsprocedures. See the chapter "Color QuickDraw" in this book for information about the
CQDProcsrecord and the