Wrap a grob (or list of grobs) as a mask for vl_viewport(mask = ...). The mask
content is rendered to an isolated layer; its coverage then modulates the
visibility of the viewport's contents.
Usage
as_mask(grob, type = c("alpha", "luminance"))Examples
as_mask(circle_grob(r = 0.4, gp = vl_gpar(fill = "white", col = NA)))
#> <vellum_mask> type = "alpha", 1 grob
