On 3/31/2009 12:29 PM, hadley wickham wrote:
col2rgb("#00000079", TRUE)
[,1]
red 0
green 0
blue 0
alpha 121
col2rgb("#00000080", TRUE)
[,1]
red 255
green 255
blue 255
alpha 0
col2rgb("#00000081", TRUE)
[,1]
red 0
green 0
blue 0
alpha 129
Any ideas?
The #00000080 string converts into the hex integer 0x80000000, which, by
an unfortunate coincidence, is the NA_integer value. Since NA_integer
becomes the background colour, you get white instead of black with
alpha=0x80.
This can probably be fixed (if you have a string, there's a different
way to know you have an NA). Want to work out a patch? The file to
look at is src/main/colors.c.
Duncan Murdoch
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.