Struct gfx_glyph::SectionText
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
.
Trait Implementations
impl<'a> Clone for SectionText<'a>
impl<'a> Clone for SectionText<'a>
fn clone(&self) -> SectionText<'a>
fn clone(&self) -> SectionText<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<'a> Debug for SectionText<'a>
impl<'a> Debug for SectionText<'a>
impl Default for SectionText<'static>
impl Default for SectionText<'static>
fn default() -> SectionText<'static>
fn default() -> SectionText<'static>
Returns the “default value” for a type. Read more
sourceimpl<'a> From<&'a OwnedSectionText> for SectionText<'a>
impl<'a> From<&'a OwnedSectionText> for SectionText<'a>
sourcefn from(owned: &'a OwnedSectionText) -> SectionText<'a>
fn from(owned: &'a OwnedSectionText) -> SectionText<'a>
Converts to this type from the input type.
sourceimpl From<&SectionText<'_>> for OwnedSectionText
impl From<&SectionText<'_>> for OwnedSectionText
sourcefn from(st: &SectionText<'_>) -> OwnedSectionText
fn from(st: &SectionText<'_>) -> OwnedSectionText
Converts to this type from the input type.
impl<'a> PartialEq<SectionText<'a>> for SectionText<'a>
impl<'a> PartialEq<SectionText<'a>> for SectionText<'a>
fn eq(&self, other: &SectionText<'a>) -> bool
fn eq(&self, other: &SectionText<'a>) -> bool
impl<'a> Copy for SectionText<'a>
impl<'a> StructuralPartialEq for SectionText<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for SectionText<'a>
impl<'a> Send for SectionText<'a>
impl<'a> Sync for SectionText<'a>
impl<'a> Unpin for SectionText<'a>
impl<'a> UnwindSafe for SectionText<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more