r-lib / marquee

Markdown Parser and Renderer for R Graphics
https://marquee.r-lib.org
Other
85 stars 1 forks source link

Honor parent vp clipping #8

Closed thomasp85 closed 6 months ago

thomasp85 commented 6 months ago

I cannot figure out why this is but marquee grobs are not clipped by the parent viewport

pushViewport(viewport(width = 0.5, height = 0.5, clip = "on"))
grid.draw(marquee_grob(markdown_test, classic_style(), width = NA))

image

teunbrand commented 6 months ago

It is become some grobs/grobTrees have fixed viewport clipping settings, like clip = "off" or clip = <grob> that overrides inheritance from the parent viewport. I'm not sure how clipping-within-clipping is supposed to be done though.

thomasp85 commented 6 months ago

Hmm, I thought viewport clipping was cumulative, not an on/off switch