Function nannou::text::position_offset[][src]

pub fn position_offset(
    num_lines: usize,
    font_size: FontSize,
    line_spacing: f32,
    bounding_rect: Rect,
    y_align: Align
) -> Vector2

The position offset required to shift the associated text into the given bounding rectangle.

This function assumes the max_width used to produce the line_infos is equal to the given bounding_rect max width.