pub struct Arrow {
pub display_id: DisplayId,
pub from: ArrowEnd,
pub to: ArrowEnd,
pub bow: Option<f64>,
pub style: Option<StrokeStyle>,
pub ttl_ms: Option<u64>,
}Expand description
Draw an arrow from one position to another. The head sits at to.
Curved by default. A gentle bow is how a person draws an arrow, and it keeps the
shaft out of whatever sits on the straight line between two points, which is often
exactly the content being talked about. bow: 0 asks for a straight one.
The daemon turns the curve into an ordinary path annotation, so an arrow scrolls, expires, and picks its colour exactly as a freehand path does.
Fields§
§display_id: DisplayIdThe display both ends sit on.
from: ArrowEndWhere the arrow starts.
to: ArrowEndWhere the arrow points.
bow: Option<f64>How far the shaft bows off the straight line, as a signed fraction of its length.
0 is straight, positive bows to the right of travel, negative to the left, and
past 1 the shape stops reading as an arrow, so that is where validation stops
accepting it. Omit for the daemon’s natural curve.
style: Option<StrokeStyle>Stroke appearance. Daemon defaults apply when absent.
ttl_ms: Option<u64>How long the arrow should live, in milliseconds.
Omit to draw until cleared, invalidated, or the session ends.