https://github.com/cran/odfWeave
Tip revision: 697a14c66adca9c600bfabb72db4d09a06ba551e authored by Max Kuhn on 07 July 2007, 00:00:00 UTC
version 0.6.0
version 0.6.0
Tip revision: 697a14c
adjustImageSize.R
adjustImageSize <- function(x, y, scale = 1, res = 96)
{
# x, y are width, height in inches
# res is image resolution
# scale is a scaling factor to easily adjust
# pch and text sizes
temp <- getImageDefs()
if(temp$device %in% c("bmp", "jpeg", "png"))
{
temp$plotHeight <- res * y * scale
temp$plotWidth <- res * x * scale
} else {
temp$plotHeight <- y * scale
temp$plotWidth <- x * scale
}
temp$dispHeight <- y
temp$dispWidth <- x
setImageDefs(temp)
rm(temp)
invisible()
}