Function nannou::ui::prelude::text::cursor::xys_per_line_from_text[][src]

pub fn xys_per_line_from_text(
    text: &'a str,
    line_infos: &'a [Info],
    font: &'a Font<'static>,
    font_size: u32,
    x_align: Justify,
    y_align: Align,
    line_spacing: f64,
    rect: Rect
) -> XysPerLineFromText<'a>

Notable traits for XysPerLineFromText<'a>

impl<'a> Iterator for XysPerLineFromText<'a> type Item = (Xs<'a, 'a>, Range);

Similarly to xys_per_line, this produces an iterator yielding every possible cursor position within each line of text yielded by the given iterator.

Rather than taking an iterator yielding lines and their positioning data, this method constructs its own iterator to do so internally, saving some boilerplate involved in common xys_per_line use cases.

Yields (xs, y_range), where y_range is the Range occupied by the line across the y axis and xs is every possible cursor position along the x axis.