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 4 - Color QuickDraw / Color QuickDraw Reference
Color QuickDraw Routines / Creating, Setting, and Disposing of Pixel Maps


NewPixMap

Although you typically don't need to call this routine in your application code, you can use the NewPixMap function to create a new, initialized PixMap record.

FUNCTION NewPixMap: PixMapHandle; 
DESCRIPTION
The NewPixMap function creates a new, initialized PixMap record and returns a handle to it. All fields of the PixMap record are copied from the current device's PixMap record except the color table. In System 7, the hRes and vRes fields are set to 72 dpi, no matter what values the current device's PixMap record contains. A handle to the color table is allocated but not initialized.

You typically don't need to call this routine. PixMap records are created for you when you create a window using the Window Manager functions NewCWindow and GetNewCWindow and when you create an offscreen graphics world with the NewGWorld function.

If your application creates a pixel map, your application must initialize the PixMap record's color table to describe the pixels. You can use the GetCTable function (described on page 4-83) to read such a table from a resource file; you can then use the DisposeCTable procedure (described on page 4-84) to dispose of the PixMap record's color table and replace it with the one returned by GetCTable.

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


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996