pub struct Connector {
pub from: Endpoint,
pub to: Endpoint,
pub stroke: Stroke,
}Expand description
A connector: two endpoints and a stroke.
A complete shape in the sense of Complete and fragment in
docs/model.md. The route between the two endpoints is derived from
their positions and leaving directions alone, and is never described by the caller.
Fields§
§from: EndpointOne endpoint of the connector.
to: EndpointThe other endpoint of the connector.
stroke: StrokeThe stroke the route between the two endpoints is drawn in, and the stroke an arm terminal is written in. A glyph or symbol terminal is drawn as its own cell, not in this stroke.
Trait Implementations§
Source§impl Shape for Connector
impl Shape for Connector
Source§fn draw(&self, surface: &mut dyn Surface)
fn draw(&self, surface: &mut dyn Surface)
Draws the two terminals and then the route, in that order. The order of the two terminals
is the order the endpoints are named, from then to, and it is load-bearing where two
endpoints share one position: under Above the second is the one seen.
The route is derived from the two positions and the two leaving directions alone, so it is called exactly as it always was and a terminal cannot reach it.