pub struct Line {
pub at: Pos,
pub len: u16,
pub orientation: Orientation,
pub stroke: Stroke,
}Expand description
A line: a position, a length, an orientation and a stroke. It names no glyph of its own — an
end is one arm in the line’s stroke, not a chosen glyph, because an end has to say where the
stroke stops and what may join it there, which an arm does and a literal cannot: a literal
composes as a cell with four Closed arms, so nothing connects into it and two lines meeting at
a shared end could never make the corner they make.
A complete shape in the sense of Complete and fragment in
docs/model.md. No minimum length is declared: a length of 0 draws
nothing, a length of 1 draws its one position as an end, and neither is rejected.
Fields§
§at: PosThe position of the line’s first cell.
len: u16How many cells the line occupies. Any value is accepted, including 0.
orientation: OrientationWhether the line runs along a row or a column.
stroke: StrokeThe stroke every cell this line writes is drawn in.