Bug 16453 - grid.cap does not capture portion of quartz window that lies off screen.
Summary: grid.cap does not capture portion of quartz window that lies off screen.
Status: UNCONFIRMED
Alias: None
Product: R
Classification: Unclassified
Component: Mac GUI / Mac specific (show other bugs)
Version: R 3.2.1
Hardware: x86_64/x64/amd64 (64-bit) OS X Yosemite
: P5 normal
Assignee: Simon Urbanek
URL:
Depends on:
Blocks:
 
Reported: 2015-06-25 15:19 UTC by Ted Toal
Modified: 2015-07-20 01:01 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ted Toal 2015-06-25 15:19:55 UTC
If I open the quartz device with height and width arguments that create a quartz window that fills the screen and partially lies off-screen, grid.cap captures only the portion visible on the screen.  I'm reporting this hoping it can be fixed, but I imagine this is expected behavior.  I wanted to set a large size to capture a high resolution of plotting.

Code:

library("grid")
dev.new(height=20, width=20)
plot(1:100, 1:100, type="l")
lines(1:100, 100:1)
bitmapCopy = grid.cap()
dim(bitmapCopy)
dev.off()
dev.new()
grid.raster(bitmapCopy)
Comment 1 Paul Murrell 2015-07-20 00:47:59 UTC
I believe this is expected behaviour.  Can you workaround by creating a (high-res) PNG file and then reading it back in ?
Comment 2 Ted Toal 2015-07-20 01:01:50 UTC
Yes, that's what I ended up doing.  Thanks.