Struct nannou::text::Text[][src]

pub struct Text<'a> { /* fields omitted */ }
Expand description

An instance of some multi-line text and its layout.

Implementations

Produce an iterator yielding information about each line.

The full string of text as a slice.

The layout parameters for this text instance.

The font used for this text instance.

The number of lines in the text.

The rectangle used to layout and build the text instance.

This is the same Rect that was passed to the text::Builder::build method.

The rectangle that describes the min and max bounds along each axis reached by the text.

The rectangle that describes the min and max bounds along each axis reached by the text.

This is similar to bounding_rect but assumes that all lines have a height equal to font_size, rather than using the exact height.

The width of the widest line of text.

The exact height of the full text accounting for font size and line spacing..

Determine the total height of a block of text with the given number of lines, font size and line_spacing (the space that separates each line of text).

The height of all lines of text are assumed to match the font_size. If looking for the exact height, see the exact_height function.

Produce an iterator yielding each wrapped line within the Text.

The bounding rectangle for each line.

Produce an iterator yielding all lines of text alongside their bounding rects.

Produce an iterator yielding iterators yielding every glyph alongside its bounding rect for each line.

Produce an iterator yielding every glyph alongside its bounding rect.

This is the “flattened” version of the glyphs_per_line method.

Produce an iterator yielding the path events for every glyph in every line.

Produce an iterator yielding positioned rusttype glyphs ready for caching.

The window dimensions (in logical space) and scale_factor are required to transform glyph positions into rusttype’s pixel-space, ready for caching into the rusttype glyph cache pixel buffer.

Converts this Text instance into an instance that owns the inner text string.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.