Expand description
Arrowheads for segment/curve/path/line, modelled on R grid’s arrow().
Arrow only describes where and how a head should be drawn; the
geometry is computed in pixel space from an already-projected polyline by
[heads], and drawn by [draw_heads]. Geoms call these two functions —
see geom::segment/geom::curve/geom::path/geom::line (B1-3).
Structs§
- Arrow
- Describes an arrowhead to draw at the end(s) of a line-like geom,
following R grid’s
arrow().positionandlength_per_linewidthare ggplot-rs extensions, not part of grid’s API.
Enums§
Functions§
- arrow
- Build an
Arrowwith the default settings (open, 30° half-angle, 18px wings, a head at the end):arrow(), orarrow().closed().angle(20.0)for a filled, narrower head. - rect_
edge_ point - Where a straight line from a rectangle’s
centertowardtowardleaves the rectangle — i.e. the point on the rect’s boundary a segment/curve endpoint should sit at so anarrow()drawn on it lands on the box’s edge instead of overlapping into the box (too short) or stopping short in open space (too far).