Struct gfx_glyph::SectionText
[−]
[src]
pub struct SectionText<'a> { pub text: &'a str, pub scale: Scale, pub color: [f32; 4], pub font_id: FontId, }
Fields
text: &'a str
Text to render
scale: Scale
Position on screen to render text, in pixels from top-left. Defaults to (0, 0).
color: [f32; 4]
Rgba color of rendered text. Defaults to black.
font_id: FontId
Font id to use for this section.
It must be known to the GlyphBrush
it is being used with,
either FontId::default()
or the return of
add_font
.
Methods
impl<'a> SectionText<'a>
[src]
pub fn to_owned(&self) -> OwnedSectionText
[src]
Trait Implementations
impl<'a> Debug for SectionText<'a>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<'a> Clone for SectionText<'a>
[src]
fn clone(&self) -> SectionText<'a>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<'a> Copy for SectionText<'a>
[src]
impl Default for SectionText<'static>
[src]
impl<'a> Hash for SectionText<'a>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<'a> From<SectionText<'a>> for GlyphInfo<'a>
[src]
fn from(section: SectionText<'a>) -> Self
[src]
Performs the conversion.
impl<'a> From<&'a OwnedSectionText> for SectionText<'a>
[src]
fn from(owned: &'a OwnedSectionText) -> Self
[src]
Performs the conversion.