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 theGetPixelsStatefunction (explained in the preceding section), you can use theSetPixelsStateprocedure.
PROCEDURE SetPixelsState (pm: PixMapHandle; state: GWorldFlags);
pm- A handle to an offscreen pixel map.
state- Flags, which you usually save with the
GetPixelsStatefunction, defined by theGWorldFlagsdata 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
TheSetPixelsStateprocedure changes the state of the memory allocated for an offscreen pixel image to the state indicated by the flags specified in thestateparameter, which you typically save using theGetPixelsStatefunction.Because only an unlocked memory block can be purged,
SetPixelsStatecalls theUnlockPixelsandAllowPurgePixelsprocedures (described on page 6-33 and page 6-34, respectively) if thestateparameter specifies thepixelsPurgeableflag. If thestateparameter does not specify thepixelsPurgeableflag,SetPixelsStatemakes the base address for the offscreen pixel image unpurgeable.If the
stateparameter does not specify thepixelsLockedflag,SetPixelsStateallows the base address for the offscreen pixel image to be moved.SPECIAL CONSIDERATIONS
TheSetPixelsStateprocedure 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 theSetPixelsStateprocedure are
Trap macro Selector _QDExtensions $0008000E SEE ALSO
After usingGetPixelsStateand before usingSetPixelsState, your application can temporarily alter the offscreen graphics world by using theAllowPurgePixelsprocedure (described on page 6-34) to temporarily mark the memory block for its offscreen pixel map as purgeable, theNoPurgePixelsprocedure (described on page 6-35) to make it unpurgeable, theLockPixelsfunction (described on page 6-32) to prevent it from being moved, and theUnlockPixelsprocedure (described on page 6-33) to unlock it.