Struct gfx_glyph::legacy::SectionText
source · pub struct SectionText<'a> {
pub text: &'a str,
pub scale: PxScale,
pub color: [f32; 4],
pub font_id: FontId,
}
Fields§
§text: &'a str
Text to render
scale: PxScale
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
.
Implementations§
Trait Implementations§
source§impl<'a> Clone for SectionText<'a>
impl<'a> Clone for SectionText<'a>
source§fn clone(&self) -> SectionText<'a>
fn clone(&self) -> SectionText<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for SectionText<'a>
impl<'a> Debug for SectionText<'a>
source§impl Default for SectionText<'static>
impl Default for SectionText<'static>
source§fn default() -> SectionText<'static>
fn default() -> SectionText<'static>
Returns the “default value” for a type. Read more
source§impl<'a> From<&'a OwnedSectionText> for SectionText<'a>
impl<'a> From<&'a OwnedSectionText> for SectionText<'a>
source§fn from(owned: &'a OwnedSectionText) -> SectionText<'a>
fn from(owned: &'a OwnedSectionText) -> SectionText<'a>
Converts to this type from the input type.
source§impl From<&SectionText<'_>> for OwnedSectionText
impl From<&SectionText<'_>> for OwnedSectionText
source§fn from(st: &SectionText<'_>) -> OwnedSectionText
fn from(st: &SectionText<'_>) -> OwnedSectionText
Converts to this type from the input type.
source§impl<'a> PartialEq<SectionText<'a>> for SectionText<'a>
impl<'a> PartialEq<SectionText<'a>> for SectionText<'a>
source§fn eq(&self, other: &SectionText<'a>) -> bool
fn eq(&self, other: &SectionText<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.