Arguments are two grobs clippee and clipper plus use_R41_clipping, image res, and the normal grob arguments like name...
Use getOption("ggpattern.use_R41_clipping")) as default for use_R41_clipping
If isTRUE(use_R41_clipping) then use the new R 4.1 clip = grob within a viewport functionality otherwise convert both clippee and clipper to identically dimensioned rasters with help of res and then calculate and return an appropriately clipped rasterGrob
Uses:
No longer any need for pattern authors to manually clip pattern boundaries when creating new patterns (although there may be a performance hit versus explicitly clipping with tools like {sf}) which may be particularly hard for certain desired patterns like #40
Can take any existing patternGrob and provide support for "holes"
New 'clipGrob()' function:
clippee
andclipper
plususe_R41_clipping
, imageres
, and the normal grob arguments likename
...getOption("ggpattern.use_R41_clipping"))
as default foruse_R41_clipping
isTRUE(use_R41_clipping)
then use the new R 4.1clip = grob
within a viewport functionality otherwise convert bothclippee
andclipper
to identically dimensioned rasters with help ofres
and then calculate and return an appropriately clippedrasterGrob
Uses:
{sf}
) which may be particularly hard for certain desired patterns like #40