[]Enum gfx_glyph::Layout

pub enum Layout<L> where
    L: LineBreaker
{ SingleLine { line_breaker: L, h_align: HorizontalAlign, v_align: VerticalAlign, }, Wrap { line_breaker: L, h_align: HorizontalAlign, v_align: VerticalAlign, }, }

Built-in GlyphPositioner implementations.

Takes generic LineBreaker to indicate the wrapping style. See BuiltInLineBreaker.

Example

let layout = Layout::default().h_align(HorizontalAlign::Right);

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.

Fields of SingleLine

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.

Fields of Wrap

Methods

impl Layout<BuiltInLineBreaker>

impl<L> Layout<L> where
    L: LineBreaker

Returns an identical Layout but with the input h_align

Returns an identical Layout but with the input v_align

Returns an identical Layout but with the input line_breaker

Trait Implementations

impl<L> Clone for Layout<L> where
    L: LineBreaker + Clone

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<L> Copy for Layout<L> where
    L: LineBreaker + Copy

impl Default for Layout<BuiltInLineBreaker>

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

impl<L> Eq for Layout<L> where
    L: LineBreaker + Eq

impl<L> GlyphPositioner for Layout<L> where
    L: LineBreaker

Calculate a sequence of positioned glyphs to render. Custom implementations should return the same result when called with the same arguments to allow layout caching. Read more

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

impl<L> Hash for Layout<L> where
    L: LineBreaker + Hash

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

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

impl<L> PartialEq<Layout<L>> for Layout<L> where
    L: LineBreaker + PartialEq<L>, 

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<L> Debug for Layout<L> where
    L: LineBreaker + Debug

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<L> Send for Layout<L> where
    L: Send

impl<L> Sync for Layout<L> where
    L: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

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

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more