fill is the common representation stored in style()'s fill
property and canvas()'s background property: a value (a plain
colour string, or the GridPattern output of a fill_*() pattern/
gradient helper) plus an optional resolve function. resolve, when
present, is called with the real target's own bounding-box aspect ratio
at draw() time to rebuild value with the correct tile shape – see
the internal resolvable_fill()/resolve_fill() helpers (R/fill.R),
and fill_hatch()'s own aspect argument docs for the problem this
solves. resolve is NULL whenever a helper's aspect was supplied
explicitly (a fixed aspect, never automatically recomputed) or for a
fill with no aspect-dependence at all (fill_solid(), fill_none()).
Arguments
- value
A plain colour string, or a
GridPatternobject (the output ofgrid::pattern(), as returned by everyfill_*()helper besidesfill_solid()/fill_none()). Default"black".- resolve
NULL, or a function of one argument (aspect) rebuildingvaluefor a newly-known target aspect ratio. DefaultNULL.
Details
Not usually constructed directly – every fill_*() helper already
returns one, and style()/canvas() coerce a bare colour string or
GridPattern into one automatically (via the internal as_fill()
helper) if passed directly.