Important: The information in this document is obsolete and should not be used for new development.
ReserveEntry
Reserves or removes reservation from an entry in the currentGDevicedata structure's color table.
pascal void ReserveEntry ( short index, Boolean reserve);
index- The index to the entry.
reserve- A Boolean value:
trueto reserve the entry,falseto remove the reservation.DISCUSSION
TheReserveEntryfunction reserves or removes the reservation of an entry in the current color table, depending on the value of thereserveparameter. A reserved entry cannot be matched by another application's search function, andColor2Index(or other functions that depend on it such asRGBForeColor,RGBBackColor, andSetCPixel) never return that entry to another client. You could use this function to selectively protect a color for color table animation.The
ReserveEntryfunction copies the low byte of thegdIDfield of the currentGDevicedata structure into the low byte of theColorSpec.valuefield of the color table when reserving an entry, and leaves the high byte alone.ReserveEntryacts like selective protection and does not allow any changes if the currentgdIDfield is different than the one in theColorSpec.valuefield of the reserved entry. If a requested match is already reserved,ReserveEntryreturns a protection error. It can remove reservation from any entry.