[][src]Struct luminance_glyph::Text

pub struct Text<'a, X = Extra> {
    pub text: &'a str,
    pub scale: PxScale,
    pub font_id: FontId,
    pub extra: X,
}

SectionText + extra.

Fields

text: &'a str

Text to render

scale: PxScale

Position on screen to render text, in pixels from top-left. Defaults to (0, 0).

font_id: FontId

Font id to use for this section.

It must be a valid id in the FontMap used for layout calls. The default FontId(0) should always be valid.

extra: X

Extra stuff for vertex generation.

Implementations

impl<'a, X> Text<'a, X>[src]

pub fn with_text(self, text: &str) -> Text<'_, X>[src]

pub fn with_scale<S>(self, scale: S) -> Text<'a, X> where
    S: Into<PxScale>, 
[src]

pub fn with_font_id<F>(self, font_id: F) -> Text<'a, X> where
    F: Into<FontId>, 
[src]

pub fn with_extra<X2>(self, extra: X2) -> Text<'a, X2>[src]

impl<'a> Text<'a, Extra>[src]

pub fn new(text: &'a str) -> Text<'a, Extra>[src]

pub fn with_color<C>(self, color: C) -> Text<'a, Extra> where
    C: Into<[f32; 4]>, 
[src]

pub fn with_z<Z>(self, z: Z) -> Text<'a, Extra> where
    Z: Into<f32>, 
[src]

Trait Implementations

impl<'a, X> Clone for Text<'a, X> where
    X: Clone
[src]

impl<'a, X> Copy for Text<'a, X> where
    X: Copy
[src]

impl<'a, X> Debug for Text<'a, X> where
    X: Debug
[src]

impl<X> Default for Text<'static, X> where
    X: Default
[src]

impl<'a, X> From<&'a OwnedText<X>> for Text<'a, X> where
    X: Clone
[src]

impl<'a, X> PartialEq<Text<'a, X>> for Text<'a, X> where
    X: PartialEq<X>, 
[src]

impl<'a, X> StructuralPartialEq for Text<'a, X>[src]

impl<'_, X> ToSectionText for Text<'_, X>[src]

Auto Trait Implementations

impl<'a, X> RefUnwindSafe for Text<'a, X> where
    X: RefUnwindSafe

impl<'a, X> Send for Text<'a, X> where
    X: Send

impl<'a, X> Sync for Text<'a, X> where
    X: Sync

impl<'a, X> Unpin for Text<'a, X> where
    X: Unpin

impl<'a, X> UnwindSafe for Text<'a, X> where
    X: UnwindSafe

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,