stextGrob: Draw Shadow Text

View source: R/stextGrob.R

stextGrobR Documentation

Draw Shadow Text

Description

Create and draw shadow text by wrapping a textual expression into a colored framing.

Usage

stextGrob(
  label,
  x = grid::unit(0.5, "npc"),
  y = grid::unit(0.5, "npc"),
  col = "white",
  fill = "black",
  r = 0.1,
  gp = grid::gpar(),
  vp = NULL,
  name = NULL,
  ...
)

Arguments

label

A character or expression vector, see grid::textGrob().

x, y

Horizontal and vertical text position as grid::unit() objects passed to grid::grid.text().

col, fill

Framing and fill color passed to grid::gpar().

r

Blur radius of colored framing as numeric.

name, gp, vp

Graphical parameters passed to grid::gTree().

...

Additional arguments passed to [grid::grid.text()].

Value

A text grob created by grid::gTree().

Author(s)

Baptiste Auguie, Florian Detsch

Examples

library(grid)
grid.newpage()
grid.rect(gp = gpar(fill = "grey"))
grid.stext("test")


Orcs documentation built on Jan. 6, 2023, 5:14 p.m.