
Create a sketchy polygon grob with optional hachure fill
Source:R/grob-sketch.R
sketch_polygon_grob.RdCreate 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 = NULL,
fill_weight = 0.5,
fill_roughness = NULL,
fill_seed = NULL,
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 (colsets fill-line colour).- outline_gp
gpar()for the rough outline stroke.- fill_style, hachure_angle, hachure_gap, fill_weight
Fill parameters (
hachure_gapin device inches;NULLpicks 15% of the shape's smaller drawn extent, clamped to [0.04, 0.4] inches).- fill_roughness
Roughness of the fill strokes.
NULL(default) ties it to the outline asroughness * 0.5; set a number to control the fill texture independently of the outline.- fill_seed
Seed for the fill strokes.
NULL(default) derives it fromseed; set an integer to vary the fill pattern without moving the outline.- name, vp
Passed to
grid::grob().