Draws a handwriting label on a tilted square of paper: a faint shadow, the paper inside a roughened outline, the label turned with the note, and optional strips of tape with torn ends across its top. The note sizes to the label at draw time (device-space text metrics).
Usage
sketch_note_grob(
x,
y,
label,
width = NULL,
height = NULL,
angle = 0,
padding = 0.12,
shadow = TRUE,
tape = "top",
roughness = 0.6,
bowing = 0.5,
n_passes = 2L,
seed = NULL,
text_gp = gpar(),
note_gp = gpar(col = "grey15", fill = "#FFF176"),
tape_gp = gpar(fill = "#E3D6AFB3"),
name = NULL,
vp = NULL
)Arguments
- x, y
Note centre in npc [0,1] (scalars).
- label
Label text;
"\n"breaks lines.- width, height
Note size in inches.
NULL(the default) fits a square to the label, at least 0.6 inches a side; givewidthalone for a square of that side.- angle
Tilt in degrees, anticlockwise. Default 0.
- padding
Space around the label, in inches. Default 0.12.
- shadow
Draw a faint shadow under the note? Default
TRUE.- tape
Tape:
"top"(a strip across the top edge, the default),"corners"(a strip across each top corner) or"none".- roughness, bowing, n_passes, seed
Sketch parameters for the outline.
- text_gp, note_gp, tape_gp
gpar()s for the label, the note (itscolthe outline, itsfillthe paper) and the tape (itsfill).- name, vp
Passed to
grid::gTree().
