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 / Creating, Altering, and Disposing of Offscreen Graphics Worlds


NewScreenBuffer

The NewGWorld function uses the NewScreenBuffer function to create an offscreen PixMap record and allocate memory for the base address of its pixel image; applications generally don't need to use NewScreenBuffer.

FUNCTION NewScreenBuffer (globalRect: Rect; 
                          purgeable: Boolean; VAR gdh: GDHandle; 
                          VAR offscreenPixMap: PixMapHandle): 
                          QDErr;
globalRect

The boundary rectangle, in global coordinates, for the offscreen pixel map.
purgeable
A value of TRUE to make the memory block for the offscreen pixel map purgeable, or a value of FALSE to make it unpurgeable.
gdh
The handle to the GDevice record for the graphics device with the greatest pixel depth among all graphics devices whose boundary rectangles intersect the rectangle specified in the globalRect parameter.
offscreenPixMap
A handle to the new offscreen PixMap record.
DESCRIPTION
The NewScreenBuffer function creates a new offscreen PixMap record, using the pixel depth and color table of the device whose GDevice record is returned in the gdh parameter. The NewScreenBuffer function returns a handle to the new offscreen pixel map in the offscreenPixMap parameter.

As its function result, NewScreenBuffer returns one of three result codes.

SPECIAL CONSIDERATIONS
The NewScreenBuffer 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 NewScreenBuffer function are
Trap macroSelector
_QDExtensions$000E0010

RESULT CODES
noErr0No error
paramErr-50Illegal parameter
cNoMemErr-152Failed to allocate memory for structures

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996