Important: The information in this document is obsolete and should not be used for new development.
PrOpenPage
Use thePrOpenPageprocedure to begin to print a new page.
PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);
pPrPort- A pointer to a printing graphics port. (The
TPrPortrecord that defines a printing graphics port is described on page 9-48.)pPageFrame
For deferred printing, a pointer to a rectangle to be used as the QuickDraw picture frame for this page. To print the page with no scaling, specifyNILto use the rectangle in therPagefield of theTPrInforecord as the picture frame.DESCRIPTION
ThePrOpenPageprocedure sets up the printing graphics port to print a new page. After callingPrOpenPage, your application should draw the data for that page and then call thePrClosePageprocedure, which is described in the next section.The page is printed only if it falls within the page range stored in the
TPrJobrecord contained in theTPrintrecord supplied to thePrOpenDocfunction (described on page 9-64).If the user has chosen deferred printing for a printer driver that supports deferred printing, the driver uses the QuickDraw procedure
DrawPictureto scale the rectangle named in thepPageFrameparameter so that it coincides with the rectangle specified in therPagefield of theTPrInforecord (which is contained in theTPrintrecord supplied to thePrOpenDocfunction). Unless you want the printout to be scaled, you should set thepPageFrameparameter toNIL--this uses the rectangle in therPagefield as the picture frame, so that the page is printed with no scaling.SPECIAL CONSIDERATIONS
You must balance every call toPrOpenPagewith a call toPrClosePage.The printing graphics port is completely reinitialized by
PrOpenPage. Therefore, you must set graphics port features such as the font family and font size for every page that you draw after you call this procedure.Don't call the QuickDraw function
OpenPicturewhile a page is open (after a call toPrOpenPagebut before callingPrClosePage). You can, however, call theDrawPictureprocedure at any time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePrOpenPageprocedure are
Trap macro Selector _PrGlue $10000808 SEE ALSO
For an example of the use ofPrOpenPage, see Listing 9-2 beginning on page 9-18. The QuickDraw routinesOpenPictureandDrawPictureare described in the chapter "Pictures" in this book.