Fills a region with engrave_fill(): a ladder of hatch layers whose
accumulated density follows a tone field, so the region shades continuously
from blank paper (light) to dense cross-hatch (dark) the way an etching does.
The hatch geometry is computed in device inches (so angles and wobble are
device-consistent); the field is supplied in npc [0,1] and sampled through
an inch-to-npc affine at draw time.
sketch_engrave_grob(
rings,
field,
ladder = NULL,
ladder_levels = 5L,
ladder_base_gap = 0.08,
ladder_gap_ratio = 0.62,
ladder_base_angle = 45,
ladder_cross_after = 3L,
roughness = 0.5,
bowing = 0.3,
seed = NULL,
min_gap_in = 0.012,
gp = gpar(),
name = NULL,
vp = NULL
)A SketchEngraveGrob grob subclass.
A list of rings, each a list with npc [0,1] x and y vertex
vectors bounding the region to engrave (even-odd holes honoured).
A vectorised tone function function(x, y) taking npc [0,1]
coordinates and returning tone in [0, 1] (0 = paper, 1 = darkest).
A ladder from engrave_ladder(); NULL builds a default from
the ladder_* parameters.
Ladder
controls used when ladder is NULL. ladder_base_gap is an npc-x
fraction (converted to inches at draw time).
Sketch parameters for the engraving strokes.
Hard pitch floor in inches: ladder layers finer than this are dropped, so the darkest tones cannot explode into a runaway number of strokes. Default 0.012.
gpar() for the engraving strokes (col, lwd).
Passed to grid::gTree().
Other grob-layer:
sketch_arrow_grob(),
sketch_band_grob(),
sketch_callout_grob(),
sketch_dotplot_grob(),
sketch_ellipse_grob(),
sketch_path_grob(),
sketch_polygon_grob(),
sketch_repel_grob(),
sketch_spray_grob(),
sketch_stroke_grob(),
sketch_wedge_grob()