Carbon


PMSessionGetGraphicsContext

Header: PMCore.h Carbon status: Supported

Obtains the current graphics context.

OSStatus PMSessionGetGraphicsContext (
    PMPrintSession printSession, 
    CFStringRef graphicsType, 
    void **graphicsContext
);
Parameter descriptions
printSession

A PMPrintSession object.

graphicsType

The desired graphics context type.

graphicsContext

On return, a reference to the current graphics context. This reference must be typecast to an appropriate structure (such as a grafPort) by the caller.

function result

A result code. A result code. See “Result Codes”.

DISCUSSION

On Mac OS 8 and 9, applications are limited to a QuickDraw context, so PMSessionGetGraphicsContext returns the printing graphics port. On Mac OS X, the graphics context is an opaque graphics port. The graphicsType argument is currently ignored, but a future version of the Carbon Printing Manager will support the ability to switch between QuickDraw and Core Graphics contexts on Mac OS X.

SPECIAL CONSIDERATIONS

Valid within the context of a printing session after calling PMSessionBeginDocument.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)