[Rd] re: transparency

Thomas Lumley tlumley@u.washington.edu
Fri, 10 Aug 2001 09:49:33 -0700 (PDT)


On Thu, 9 Aug 2001, Prof Brian Ripley wrote:

> However, for the future (1.4.x), I think we should handle "white" and
> "transparent" differently, and have bg default to "transparent" for
> all devices.  A quick look shows that this is would be easy, as only
> 24 bits of the rcolor type are used.  So would there be an objections
> to using a bit (or a single value) of the upper byte to denote
> "transparent"?  (Actually, Peter D has 0xffffffff in use as invalid,
> but that's more bits than are needed.)  For consistency "transparent"
> should be an alternative to NA in the fill routines, which means that
> the obvious rcolor value is (unsigned) NA_INTEGER.

Definitely transparency would be very useful, and I think a bit in the
upper byte is a good place to store it.

> One question then is what bg="transparent" would mean for a screen
> device. I think it should mean "white", but the difference would
> emerge if the device was copied.  An alternative for the windows()
> device (which can have a canvas larger than the device region) would
> be the canvas colour (default grey50).  In that case one might want a
> default of "white".

If "transparent" is to be the default then I think it should show up as
white on screen (at least by default)

It would be nice if a canvas color were available for other screen
devices, to allow easier previewing of transparent graphics against
different background colors.  It's obviously not that important, since you
can always plot the graph against a filled background of that color, but
it would be convenient if it isn't too hard. That is, the default color
would be set by some sort of options(canvas.color) that would default to
eg "grey50" or "white".

	-thomas

Thomas Lumley			Asst. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._