Skip to main content

Module route

Module route 

Source

Structs§

Course
Where a wire is drawn: its solved geometry, and the hops it makes over the wires it crosses. The hops depend on the wires around it, so the caller computes them over what it draws (crate::widget::drawing::Drawing::hops).

Enums§

LabelPass
Which of its labels a route render includes. A tool that draws a label itself — dragged, or under an in-place editor — leaves that one out.
RouteRenderMode

Constants§

ROUTE_HOVER_WIDTH 🔒
Wire width when hovered, world units.
ROUTE_SELECTION_HALO_WIDTH 🔒
Width of the foreground halo drawn behind a selected route, world units — wide enough to peek out either side of the resting wire on top of it.
ROUTE_WIDTH 🔒
Resting wire width, world units.

Functions§

draw_text_anchor 🔒
horizontal_label_anchor
World-space anchor where a horizontal route label is drawn (its bottom center, nudged up off the wire). Shared with the in-place editor so it can sit exactly over the text it replaces.
render_route
render_route_label_at
Draw one of route’s labels at at, oriented along the wire there. An unnamed route shows the faint “add name” prompt (mirroring the pin placeholder); a named one shows the name in color.
render_text_anchors
Draw a route’s text-anchor diamonds (the spots a new label can attach).
render_waypoint_handles
Draw waypoint handles: a user-pinned (locked) corner prominently, a structural bend the router laid down faint and small.
route_text_color
The color route’s label text takes under mode: the wire’s accent when set, else the mode’s resting or highlight color.