Newsgroups: comp.windows.x
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!news.cs.indiana.edu!msi.umn.edu!umeecs!zip!spencer
From: spencer@eecs.umich.edu (Spencer W. Thomas)
Subject: Simple but slow color under X
In-Reply-To: kchen@nit.cs.usu.EDU's message of 7 Apr 91 19: 59:26 GMT
Message-ID: <SPENCER.91Apr8161304@spline.eecs.umich.edu>
Sender: usenet@zip.eecs.umich.edu (Mr. News)
Organization: University of Michigan EECS Dept
References: <9104071959.AA20118@nit.cs.usu.edu>
Date: Mon, 8 Apr 1991 21:13:04 GMT

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)

