spencer@eecs.umich.edu (Spencer W. Thomas) (04/09/91)
My 'cpixels.c' file, which I have posted to comp.sources.x, will do what you want -- it sets up a "standard" (but not in the X sense) colormap, and then lets you specify pixel colors with floating point RGB values (in the range 0-1). It uses ordered dither to approximate 24-bit colors on "shallow" displays (8 or 1 bit, e.g.). On 24-bit displays, it uses the full display resolution. It also will provide a magnified view (at the cost of running even slower), if you want to zoom in on a particular pixel. The distribution includes a silly paint program called 'demo2' (based on Motif toolkit, unfortunately) that illustrates using the package. It also includes a couple of semi-useful widgets: Slate is an enhanced Core that provides a drawing area with mouse and expose callbacks, and Cmap displays the colormap, and allows you to pick colors from it. -- =Spencer W. Thomas EECS Dept, U of Michigan, Ann Arbor, MI 48109 spencer@eecs.umich.edu 313-936-2616 (8-6 E[SD]T M-F)