From ihaka@stat.auckland.ac.nz  Fri Apr  2 05:35:30 1999
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Fri, 2 Apr 1999 16:35:30 +1200 (NZST)
Subject: X11 Device Driver
Message-ID: <Pine.BSF.3.96.990402161719.3510B-100000@g.ihaka.slip.auckland.ac.nz>

I have made some modifications to the X11 graphics driver so that it is
more flexible about its use of colors.  I have added a new parameter to
the X11/x11 function which controls this.  The parameter is currently
called "colormodel" and works as follows:

	colormodel = 0		Monochrome graphics
	colormodel = 1		Grayscale (256 shades)
	colormodel = 2		Pseudocolor1
	colormodel = 3		Pseudocolor2
	colormodel = 4		Truecolor

Pseudocolor1 allocates as big a color cube as possible and then
approximates requested colors with colors from the cube.

Pseudocolor2 allocates colors "on-demand" until it runs out of
colors.  You then get a "can't allocate colors" error message.

More sophisticated devices will support the color models of less
sophisticated devices.  E.g. you can do grey-scale and pseudocolor
on a truecolor device.

So, one question is:  How should this functionality be packaged?

One possibility is to have multiple X11 device driver entry points

    X11.mono, X11.gray, X11.pseudo1, X11.pseudo2, X11.color

This would be useful because people could use options() to set
the appropriate default device.

Another possibility would be to have use an additional argument to
the driver and to make it rather more meaningful than 0, 1, 2, 3, 4.

Perhaps there are better ideas also.

A second question is what should the default behavior be on Pseudocolor
devices; Pseudocolor1 or Pseudocolor2?

Would anyone care to express an opinion.  I'd like to get this commited
for the 0.64 release.

	Ross

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


X11 Device Driver
Ross Ihaka