mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-01 02:05:51 -05:00
Workaround for Cairo resolution bug
This commit is contained in:
@@ -32,7 +32,14 @@ plotPNG <- function(func, filename=tempfile(fileext='.png'),
|
||||
pngfun <- png
|
||||
} else if (nchar(system.file(package = "Cairo"))) {
|
||||
require(Cairo)
|
||||
pngfun <- CairoPNG
|
||||
|
||||
# Workaround for issue #140: Cairo ignores res and dpi settings. Need to
|
||||
# use regular png function.
|
||||
if (res == 72) {
|
||||
pngfun <- CairoPNG
|
||||
} else {
|
||||
pngfun <- png
|
||||
}
|
||||
} else {
|
||||
pngfun <- png
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user