Important: The information in this document is obsolete and should not be used for new development.
SetPixelsState
To restore an offscreen pixel image to the state that you saved with theGetPixelsState
function (explained in the preceding section), you can use theSetPixelsState
procedure.
PROCEDURE SetPixelsState (pm: PixMapHandle; state: GWorldFlags);
pm
- A handle to an offscreen pixel map.
state
- Flags, which you usually save with the
GetPixelsState
function, defined by theGWorldFlags
data type:TYPE GWorldFlags = SET OF ( {flags for SetPixelsState are listed here} pixelsPurgeable, {make the base address for an } { offscreen pixel image purgeable} pixelsLocked {prevent the base address for an } { offscreen pixel image from } { being moved} );DESCRIPTION
TheSetPixelsState
procedure changes the state of the memory allocated for an offscreen pixel image to the state indicated by the flags specified in thestate
parameter, which you typically save using theGetPixelsState
function.Because only an unlocked memory block can be purged,
SetPixelsState
calls theUnlockPixels
andAllowPurgePixels
procedures (described on page 6-33 and page 6-34, respectively) if thestate
parameter specifies thepixelsPurgeable
flag. If thestate
parameter does not specify thepixelsPurgeable
flag,SetPixelsState
makes the base address for the offscreen pixel image unpurgeable.If the
state
parameter does not specify thepixelsLocked
flag,SetPixelsState
allows the base address for the offscreen pixel image to be moved.SPECIAL CONSIDERATIONS
TheSetPixelsState
procedure may move or purge memory blocks in the application heap. Your application should not call this procedure at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theSetPixelsState
procedure are
Trap macro Selector _QDExtensions $0008000E SEE ALSO
After usingGetPixelsState
and before usingSetPixelsState
, your application can temporarily alter the offscreen graphics world by using theAllowPurgePixels
procedure (described on page 6-34) to temporarily mark the memory block for its offscreen pixel map as purgeable, theNoPurgePixels
procedure (described on page 6-35) to make it unpurgeable, theLockPixels
function (described on page 6-32) to prevent it from being moved, and theUnlockPixels
procedure (described on page 6-33) to unlock it.