II.6

A GENERIC PIXEL SELECTION MECHANISM

Alan W. Paeth,     NeuralWare Inc., Pittsburgh, Pennsylvania

Publisher Summary

Reversing the colors of a frame buffer’s pixels is a common way to highlight a region. A useful reversal function provides color pairs that are visually distinct. On newer hardware, lookup tables are keyed by the window, introducing spatial dependence. This burdens the design of a best function. This chapter discusses a simple a priori solution that guarantees visually distinct color pairs, though their eventual appearance remains unknown to the algorithm. The typical use is in creating screen-wide, window-invariant tools such as system cursors or selection rectangles for display snapshots. The solution used in the Palette ...

Get Graphics Gems III (IBM Version) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.