Open tyner opened 6 years ago
Hi, that's a clipping issue (in package rvg
).
Same problem can be found with officer
:
library(lattice)
library(officer)
library(rvg)
p <- xyplot(1 ~ 1,
xlim = c(0, 1),
ylim = c(0, 1),
panel = function(x, y, ...) {
eps <- 0.0001
panel.polygon(x = c(0.25, 0.75, 0.75, 0.25),
#y = c(0, -eps, 0.50, 0.50), # This is working
y = c(-eps, -eps, 0.50, 0.50), # This is not working
border = NA,
col = "yellow"
)
}
)
out <- read_pptx()
out <- add_slide(out,
layout = "Title and Content", master = "Office Theme")
out <- ph_with_vg(out, code = print(p), type = "body")
print(out, target = "polygon.pptx")
Sorry, I don't have time to work on that now, it's unlikely to be solved soon.
Hi,
If I run
then it renders the yellow rectangle as a triangle. This happens on both linux as well as on windows. Here is my sessionInfo()
Any ideas? I realize that part of the rectangle is outside of the grid viewport, but figured I would ask here first since it does the right in in other graphics devices.
Regards, Ben