Closed teunbrand closed 6 months ago
Hi Thomas,
In the new version of ragg, rectangles (not polygons in general) appear to ignore the linejoin setting. When specifying a rectangle with linejoin = "mitre", I expected straight corners, but rounded corners show up.
linejoin
linejoin = "mitre"
library(grid) tmp1 <- tempfile(fileext = ".png") tmp2 <- tempfile(fileext = ".png") draw_rect <- function() { grid.newpage() grid.rect( width = 0.5, height = 0.5, gp = gpar(lwd = 20, linejoin = "mitre") ) } ragg::agg_png(tmp1) draw_rect() dev.off() #> png #> 2 knitr::include_graphics(tmp1)
For reference how I expected the rectangle to look like:
png(tmp2, type = "cairo-png") draw_rect() dev.off() #> png #> 2 knitr::include_graphics(tmp2)
Created on 2024-03-14 with reprex v2.1.0
weird - I was sure I fixed that... Thanks for the report, I'll do it properly this time
Hi Thomas,
In the new version of ragg, rectangles (not polygons in general) appear to ignore the
linejoin
setting. When specifying a rectangle withlinejoin = "mitre"
, I expected straight corners, but rounded corners show up.For reference how I expected the rectangle to look like:
Created on 2024-03-14 with reprex v2.1.0