Skip to main content

virtual_cell

Function virtual_cell 

Source
pub fn virtual_cell(cell: f32) -> u32
Expand description

Round a fractional display cell to the nearest cell boundary, floored at 0 — the quantization for a column (box) selection’s virtual corner cells, which may lie past any line’s content and so can’t resolve through RowLayout::hit yet. The same round-half-up rule hit applies over real content, so a box edge and a click at the same pixel agree on the boundary.