Struct ggez::graphics::TextFragment[][src]

pub struct TextFragment {
    pub text: String,
    pub color: Option<Color>,
    pub font_id: Option<FontId>,
    pub scale: Option<Scale>,
}

A piece of text with optional color, font and font scale information. These options take precedence over any similar field/argument. Can be implicitly constructed from String, (String, Color), and (String, FontId, Scale).

Fields

Text string itself.

Fragment's color, defaults to text's color.

Fragment's font ID, defaults to text's font ID.

Fragment's scale, defaults to text's scale.

Trait Implementations

impl Clone for TextFragment
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TextFragment
[src]

Formats the value using the given formatter. Read more

impl Default for TextFragment
[src]

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

impl From<String> for TextFragment
[src]

Performs the conversion.

impl From<(String, Color)> for TextFragment
[src]

Performs the conversion.

impl<FI> From<(String, FI, Scale)> for TextFragment where
    FI: Into<FontId>, 
[src]

Performs the conversion.

impl<'a> From<&'a str> for TextFragment
[src]

Performs the conversion.

impl<'a> From<(&'a str, Color)> for TextFragment
[src]

Performs the conversion.

impl<'a, FI> From<(&'a str, FI, Scale)> for TextFragment where
    FI: Into<FontId>, 
[src]

Performs the conversion.

Auto Trait Implementations