Enum gfx_glyph::Layout [] [src]

pub enum Layout<G: GlyphGrouper> {
    SingleLine(G, HorizontalAlign),
    Wrap(G, HorizontalAlign),
}

Built-in GlyphPositioner implementations.

Takes generic GlyphGrouper to indicate the wrapping style, see GlyphGroup for built-in groupings.

Variants

Renders a single line from left-to-right according to the inner alignment. Newline characters 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. Newline characters will cause advancement to another line. A characters hitting the width bound will also cause another line to start.

Methods

impl<G: GlyphGrouper> Layout<G>
[src]

Trait Implementations

impl<G: Debug + GlyphGrouper> Debug for Layout<G>
[src]

Formats the value using the given formatter.

impl<G: Clone + GlyphGrouper> Clone for Layout<G>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<G: Copy + GlyphGrouper> Copy for Layout<G>
[src]

impl<G: Hash + GlyphGrouper> Hash for Layout<G>
[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<GlyphGroup>
[src]

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

impl<Grouper: GlyphGrouper> GlyphPositioner for Layout<Grouper>
[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