Function nannou::text::cursor::closest_line

source ·
pub fn closest_line<'a, I>(
    y_pos: Scalar,
    xys_per_line: I
) -> Option<(usize, Xs<'a, 'a>, Range)>
where I: Iterator<Item = (Xs<'a, 'a>, Range)>,
Expand description

Find the closest line for the given y position, and return the line index, Xs iterator, and y-range of that line

Returns None if there are no lines