Enum gfx_glyph::Layout [] [src]

pub enum Layout<L: LineBreaker> {
    SingleLine(L, HorizontalAlign),
    Wrap(L, HorizontalAlign),
}

Built-in GlyphPositioner implementations.

Takes generic LineBreaker to indicate the wrapping style. See StandardLineBreaker, AnyCharLineBreaker.

Variants

Renders a single line from left-to-right according to the inner alignment. Hard breaking will end the line, partially hitting the width bound will end the line.

Renders multiple lines from left-to-right according to the inner alignment. Hard breaking characters will cause advancement to another line. A characters hitting the width bound will also cause another line to start.

Methods

impl<L: LineBreaker> Layout<L>
[src]

Trait Implementations

impl<L: Debug + LineBreaker> Debug for Layout<L>
[src]

Formats the value using the given formatter.

impl<L: Clone + LineBreaker> Clone for Layout<L>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<L: Copy + LineBreaker> Copy for Layout<L>
[src]

impl<L: Hash + LineBreaker> Hash for Layout<L>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for Layout<StandardLineBreaker>
[src]

Returns the "default value" for a type. Read more

impl<L: LineBreaker> GlyphPositioner for Layout<L>
[src]

Calculate a sequence of positioned glyphs to render. Custom implementations should always return the same result when called with the same arguments. If not consider disabling cache_glyph_positioning. Read more

Return a rectangle according to the requested render position and bounds appropriate for the glyph layout. Read more