Type Direction

type Direction uint8

Direction is an explicit local inline-flow direction. The zero value and unknown values resolve to LTR; no platform or process-global state is read or changed.

Methods

End#

func (direction Direction) End(bounds ui.Rect, size float32) ui.Rect

End returns a strip at logical inline-end.

InlineDelta#

func (direction Direction) InlineDelta(delta float32) float32

InlineDelta converts a logical positive movement toward inline-end into a physical x delta.

Inset#

func (direction Direction) Inset(bounds ui.Rect, insets LogicalInsets) ui.Rect

Inset resolves logical insets and clamps an over-constrained result to an empty physical rectangle.

IsRTL#

func (direction Direction) IsRTL() bool

IsRTL reports whether logical inline-start is the physical right edge.

Rect#

func (direction Direction) Rect(container ui.Rect, logical LogicalRect) ui.Rect

Rect resolves logical geometry inside a physical containing rectangle.

Start#

func (direction Direction) Start(bounds ui.Rect, size float32) ui.Rect

Start returns a strip at logical inline-start.

VisualIndex#

func (direction Direction) VisualIndex(logicalIndex, count int) int

VisualIndex maps a logical index to its physical order. Out-of-range inputs return -1 rather than silently wrapping.