Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 6 - Offscreen Graphics Worlds / Offscreen Graphics Worlds Reference
Routines / Managing an Offscreen Graphics World's Pixel Image


GetPixBaseAddr

You can use the GetPixBaseAddr function to obtain a pointer to an offscreen pixel map.

FUNCTION GetPixBaseAddr (pm: PixMapHandle): Ptr;
pm
A handle to an offscreen pixel map. To get a handle to an offscreen pixel map, use the GetGWorldPixMap function, described on page 6-31.
DESCRIPTION
The GetPixBaseAddr function returns a 32-bit pointer to the beginning of a pixel image. The baseAddr field of the PixMap record for an offscreen graphics world contains a handle instead of a pointer, which is what the baseAddr field for an onscreen pixel map contains. You must use the GetPixBaseAddr function to obtain a pointer to the PixMap record for an offscreen graphics world.

Your application should never directly access the baseAddr field of the PixMap record for an offscreen graphics world; instead, your application should always use GetPixBaseAddr. If your application is using 24-bit mode, your application should then use the PixMap32Bit function (described next) to determine whether a pixel map requires 32-bit addressing mode for access to its pixel image.

If the offscreen buffer has been purged, GetPixBaseAddr returns NIL.

SPECIAL CONSIDERATIONS
Any QuickDraw routines that your application uses after calling GetPixBaseAddr may change the base address for the offscreen pixel image.

The GetPixBaseAddr function may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the GetPixBaseAddr function are
Trap macroSelector
_QDExtensions$0004000F

SEE ALSO
See Inside Macintosh: Memory for information about determining addressing modes.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996