Compute or draw rough polygons
Usage
rough_polygons(x, y = NULL, hand = NULL)
draw_rough_polygons(
x,
y = NULL,
hand = NULL,
col = NA,
border = graphics::par("fg"),
fill_pattern = NULL,
...
)Arguments
- x, y
Polygon coordinates.
- hand
Hand-drawn geometry settings created with
hand().- col
Fill colour. When visible and
fill_patternisNULL, a solid fill is drawn.- border
Border colour.
- fill_pattern
Optional fill pattern created with
hatch(),crosshatch(),zigzag(), orjumble().- ...
Graphics parameters passed to
graphics::lines().
Value
A list with x and y components containing a roughened closed
outline suitable for plotting with graphics::lines().
See also
Other rough drawing helpers:
rough_arrows(),
rough_lines(),
rough_points(),
rough_polypath(),
rough_rect(),
rough_segments()
Examples
plot(1:10, 1:10, type = "n")
draw_rough_polygons(c(2, 5, 8, 3), c(2, 7, 5, 1),
hand = human_hand(),
col = "grey90",
fill_pattern = zigzag())