gridpattern v1.2.1
Breaking Changes
- The default
type
for the "placeholder" pattern
is now "bear" instead of "kitten".
Explicitly settype = "kitten"
to continue to use
the "kitten" placeholder but note that although
the "kitten" placeholder website isn't completely down
it has been buggy recently (#73).
New Features
-
patternFill()
wrapspatternGrob()
to return a
grid::pattern()
fill object (#70). -
The "geometry" patterns (e.g. "circle", "stripe", etc.) now allow
thefill
to be pattern fills (#67). -
The "geometry" patterns (e.g. "circle", "stripe", etc.) now allow
the newunits
parameter to set whichgrid::unit()
to use for the
thespacing
,xoffset
, andyoffset
parameters
(and for the "wave" pattern also theamplitude
andfrequency
parameters) (#58).
By default it will continue to be "snpc" units but can now be changed to "cm", "in", etc. -
update_alpha()
updates fill colour and/or pattern transparency.- It is a fork of
ggplot2::fill_alpha()
by @teunbrand. - It does not depend on
{ggplot2}
or{scales}
. - It does not throw an error with a length one list of a vector of multiple colours.
- It is available as a "standalone" file.
You may copy its source under the permissive MIT license into your own R package by either
usingusethis::use_standalone("trevorld/gridpattern", "standalone-update_alpha.R")
or simply copyingstandalone-update_alpha.R
into your R directory and adding
grDevices
,grid
, andrlang
to theImports
of yourDESCRIPTION
file.
- It is a fork of
-
For completeness there is now a new "fill" pattern with corresponding
grid.pattern_fill()
which draws a simple fill pattern. -
For completeness there is now a
grid.pattern_none()
corresponding to the previously
supported "none" pattern which draws nothing.
Bug fixes and minor improvements
- The
wave
pattern no longer quietly and incorrectly ignores thefrequency
parameter.
The effective wavelength of the wave pattern is now1 / frequency
instead ofspacing
.
Howeverfrequency
will continue to default to1 / spacing
. clippingPathGrob()
can now more efficiently compute arasterGrob()
approximation
viaragg::agg_capture()
and forpng_device
functions that support
the clipping path feature such aspng(type = "cairo")
(#74).alphaMaskGrob()
can now more efficiently compute arasterGrob()
approximation
forpng_device
functions that support
the alpha mask feature such aspng(type = "cairo")
(#75).alphaMaskGrob()
andclippingPathGrob()
now
switch back to the previously open graphics device if
they open and close any new graphics devices.