Important: The information in this document is obsolete and should not be used for new development.
PrOpenPage
Use thePrOpenPage
procedure to begin to print a new page.
PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);
pPrPort
- A pointer to a printing graphics port. (The
TPrPort
record 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, specifyNIL
to use the rectangle in therPage
field of theTPrInfo
record as the picture frame.DESCRIPTION
ThePrOpenPage
procedure 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 thePrClosePage
procedure, which is described in the next section.The page is printed only if it falls within the page range stored in the
TPrJob
record contained in theTPrint
record supplied to thePrOpenDoc
function (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
DrawPicture
to scale the rectangle named in thepPageFrame
parameter so that it coincides with the rectangle specified in therPage
field of theTPrInfo
record (which is contained in theTPrint
record supplied to thePrOpenDoc
function). Unless you want the printout to be scaled, you should set thepPageFrame
parameter toNIL
--this uses the rectangle in therPage
field as the picture frame, so that the page is printed with no scaling.SPECIAL CONSIDERATIONS
You must balance every call toPrOpenPage
with 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
OpenPicture
while a page is open (after a call toPrOpenPage
but before callingPrClosePage
). You can, however, call theDrawPicture
procedure at any time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for thePrOpenPage
procedure 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 routinesOpenPicture
andDrawPicture
are described in the chapter "Pictures" in this book.