(PR#1881) polygon() draws non-transparent border, erase.screen
draws non-transparent border (PR#1881)
Wed, 7 Aug 2002 17:14:22 +0100 (BST)
On Wed, 7 Aug 2002 email@example.com wrote:
> Dear Brian,
> thank you for your answer.
> > There's a bug in GA_Polyline (not Polygon) stemming from the changes to
> > graphics device internals at 1.4.0, it seems. It is transparent polylines
> > one cannot draw, and only on the windows() device.
> > You don't give an example for erase.screen: does this need a separate fix?
> The original call to polygon in erase.screen() did use border=NA. I did not
> find documentation saying what an NA color means !? Testing a bit, I find
> rect(border=NA) to interpret it as "tranparent" resp. lty=0. To my understanding
> erase.screen() rather should also erase the borders in background color AS
> THE PROTOTYPE DOES (WinS+2000), look at example code below. Thus I vote for
> changing erase.screen() to use border=0 (zero). If polygon() get's fixed, there
> is no need to use rect() instead of polygon().
NA is a colour that is the same as "transparent". Unfortunately, border=0
for polygon() is documented to mean `do not draw', but that is not what
happens. Looks like this needs sorting out.
Thanks for drawing it to our attention.
> oldpar <- par(no.readonly=TRUE)
> par(mar=c(0,0,0,0), oma=c(0,0,0,0))
> figs <- rbind(
> c( 0.0, 0.5, 0.0, 1.0) # left
> , c( 0.5, 1.0, 0.0, 1.0) # right
> dimnames(figs) <- list(
> c("left","right" )
> , c("xlow","xhigh","ylow","yhigh")
> screens <- split.screen(figs)
> par(usr=c(0, 1, 0, 1))
> #plot a box on border of left screen in some color
> # now switching to right screen ERASES border of right screen in Prototype
> # thus the right border of the left box gets deleted
> GMX - Die Kommunikationsplattform im Internet.
Brian D. Ripley, firstname.lastname@example.org
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
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: email@example.com