nx_text_wrap.nx
buildroot/runtime/nx_text_wrap.nx
about
nx_text_wrap.nx -- SHARED word-level line breaking for the renderer. LAYOUT (height reservation in
nx_layout_block) and PAINT (glyph drawing in nx_paint_walk_layout) MUST agree on exactly where lines
break, else reserved line-count != painted line-count -> vertical overlap/gaps. So both call this ONE
function. Greedy word wrap: a line beginning at `start` extends as far as possible without exceeding
`cpl` chars, breaking AFTER the last space within [start, start+cpl]; a word longer than cpl is
hard-broken at start+cpl (so progress is guaranteed). Returns the line's END index (exclusive).
100% sovereign. license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_layout_block.nxnx_paint_walk_layout.nxnx_text_wrap_gate.nx
structs
| none |
consts
| none |
functions
| 10 | func tw_next_break(text: *u8, len: i64, cpl: i64, start: i64) -> i64 |