Skip to main content

Module direction

Module direction 

Source
Expand description

RTL layout mirroring and logical direction support (bd-ic6i.3).

Provides types for text-direction–aware layout: FlowDirection controls whether horizontal content flows left-to-right or right-to-left, LogicalSides maps logical start/end to physical left/right, and LogicalAlignment resolves Start/End alignment relative to flow.

§Invariants

  1. Idempotent mirroring: resolving the same logical values with the same direction always produces the same physical values.
  2. RTL↔LTR symmetry: resolve(Rtl) is the mirror of resolve(Ltr).
  3. Vertical invariance: RTL only affects the horizontal axis.
  4. Composable: logical values can be nested; each subtree resolves independently.

Structs§

LogicalSides
Padding or margin expressed in logical (direction-aware) terms.

Enums§

FlowDirection
Horizontal text flow direction.
LogicalAlignment
Alignment in logical (direction-aware) terms.

Functions§

mirror_rects_horizontal
Mirror a sequence of Rects horizontally within a containing area.