logo
pub struct TextParagraphLayout<'a, Font: AbstractFont> {
    pub string: &'a str,
    pub layout: TextLayout<'a, Font>,
    pub max_width: Font::Length,
    pub max_height: Font::Length,
    pub horizontal_alignment: TextHorizontalAlignment,
    pub vertical_alignment: TextVerticalAlignment,
    pub wrap: TextWrap,
    pub overflow: TextOverflow,
    pub single_line: bool,
}

Fields

string: &'a strlayout: TextLayout<'a, Font>max_width: Font::Lengthmax_height: Font::Lengthhorizontal_alignment: TextHorizontalAlignmentvertical_alignment: TextVerticalAlignmentwrap: TextWrapoverflow: TextOverflowsingle_line: bool

Implementations

Layout the given string in lines, and call the layout_line callback with the line to draw at position y. The signature of the layout_line function is: (glyph_iterator, line_x, line_y). Returns the baseline y coordinate.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.