Skip to contents

Create a sketchy polygon grob with optional hachure fill

Usage

sketch_polygon_grob(
  x,
  y,
  id = NULL,
  roughness = 1,
  bowing = 1,
  n_passes = 2L,
  seed = NULL,
  fill_gp = gpar(),
  outline_gp = gpar(),
  fill_style = "hachure",
  hachure_angle = 45,
  hachure_gap = 0.07,
  fill_weight = 0.5,
  name = NULL,
  vp = NULL
)

Arguments

x, y

Numeric npc [0,1] coordinates.

id

Group IDs (same semantics as grid::polygonGrob).

roughness, bowing, n_passes, seed

Sketch parameters for the outline.

fill_gp

gpar() for fill lines (col sets fill-line colour).

outline_gp

gpar() for the rough outline stroke.

fill_style, hachure_angle, hachure_gap, fill_weight

Fill parameters.

name, vp

Passed to grid::grob().

Value

A SketchPolygonGrob grob subclass.

See also