(PR#1881) polygon() draws non-transparent border, erase.screen draws non-transparent border (PR#1881)
oehl_list@gmx.de
oehl_list@gmx.de
Wed, 7 Aug 2002 17:49:22 +0200 (MEST)
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().
Best
Jens
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
box(col=5)
# now switching to right screen ERASES border of right screen in Prototype
(S+2000)
# thus the right border of the left box gets deleted
screen(2)
close.screen(all.screens=TRUE)
par(oldpar)
--
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._