pub struct StrokeCell {
pub base: Stroke,
pub top: Arm,
pub right: Arm,
pub bottom: Arm,
pub left: Arm,
}Expand description
A base stroke, always present, and four arms — one per side.
Each arm carries its own stroke. A cell once held a single stroke and drew every Set arm in
it, which was a restriction on what a cell could express rather than a different rule, and the
restriction was lifted when the reason for it ran out: a figure that crosses another needs a
different stroke on each side, and a key built from one stroke can never name the two of them,
so a light box crossing a double one drew the double’s character and lost the light stroke.
Fields§
§base: StrokeThe stroke every Set arm draws in.
top: ArmWhat the cell has on its top side.
right: ArmWhat the cell has on its right side.
bottom: ArmWhat the cell has on its bottom side.
left: ArmWhat the cell has on its left side.
Implementations§
Source§impl StrokeCell
impl StrokeCell
Sourcepub fn is_decided(&self) -> bool
pub fn is_decided(&self) -> bool
Whether every arm is decided: none of the four is Unset.
A defined cell always has a base stroke, so nothing else enters the question.
Sourcepub fn key(&self) -> GlyphKey
pub fn key(&self) -> GlyphKey
The exact key this cell resolves to in a catalog: each arm’s own stroke on every Set
side, and nothing where the arm is Closed or Unset — the two read the same at render
time.
Sourcepub fn degraded_key(&self) -> GlyphKey
pub fn degraded_key(&self) -> GlyphKey
The degraded key this cell falls back to when key matches nothing: the
cell’s own base stroke on every Set side, regardless of what that arm itself carries, and
nothing where the arm is Closed or Unset. Degrading the whole cell rather than the
smallest set of arms is what keeps “why that character?” one sentence — the figure that
owns the cell imposes its stroke on all of it — and what keeps the answer from depending on
which tables happen to be loaded.