Skip to contents

fullGrob() is a wrapper around grid::rectGrob() for a single rectangle grob filled with a color, bitmap, grob, or pattern. In particular grob or bitmap fills will be automatically converted to a grid::pattern() fill by as_fill(). grid.full() creates a fullGrob() and draws it to the screen.

Usage

fullGrob(
  fill = "transparent",
  ...,
  width = NULL,
  height = NULL,
  vp = NULL,
  name = NULL
)

grid.full(...)

as_fill(fill = "transparent", ..., width = NULL, height = NULL)

Arguments

fill

A color string, a grid::grob(), a grid::pattern(), or a bitmap like a bittermelon::bm_pixmap() or raster object.

...

Ignored for now.

width, height

If fill is a bitmap object then these will be passed to grid::rasterGrob().

vp, name

Passed to grid::rectGrob().

Value

fullGrob() and grid.full() return grid::rectGrob() object. As a side effect grid.full() draws to the active graphics device. as_fill() returns a supported grid fill object such as a color string or a grid::pattern() object.

Examples

grob <- fullGrob(grid::radialGradient())
grid::grid.draw(grob)