Important: The information in this document is obsolete and should not be used for new development.
NewPixMap
Although you typically don't need to call this routine in your application code, you can use theNewPixMap
function to create a new, initializedPixMap
record.
FUNCTION NewPixMap: PixMapHandle;DESCRIPTION
TheNewPixMap
function creates a new, initializedPixMap
record and returns a handle to it. All fields of thePixMap
record are copied from the current device'sPixMap
record except the color table. In System 7, thehRes
andvRes
fields are set to 72 dpi, no matter what values the current device'sPixMap
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 functionsNewCWindow
andGetNewCWindow
and when you create an offscreen graphics world with theNewGWorld
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 theGetCTable
function (described on page 4-83) to read such a table from a resource file; you can then use theDisposeCTable
procedure (described on page 4-84) to dispose of thePixMap
record's color table and replace it with the one returned byGetCTable
.SPECIAL CONSIDERATIONS
TheNewPixMap
function may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.