Struct glyph_brush::OwnedSectionText
source · pub struct OwnedSectionText {
pub text: String,
pub scale: Scale,
pub color: [f32; 4],
pub font_id: FontId,
}
Fields
text: String
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
sourceimpl Clone for OwnedSectionText
impl Clone for OwnedSectionText
sourcefn clone(&self) -> OwnedSectionText
fn clone(&self) -> OwnedSectionText
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 moresourceimpl Debug for OwnedSectionText
impl Debug for OwnedSectionText
sourceimpl Default for OwnedSectionText
impl Default for OwnedSectionText
sourceimpl<'a> From<&'a OwnedSectionText> for SectionText<'a>
impl<'a> From<&'a OwnedSectionText> for SectionText<'a>
sourcefn from(owned: &'a OwnedSectionText) -> Self
fn from(owned: &'a OwnedSectionText) -> Self
Converts to this type from the input type.
sourceimpl From<&SectionText<'_>> for OwnedSectionText
impl From<&SectionText<'_>> for OwnedSectionText
sourcefn from(st: &SectionText<'_>) -> Self
fn from(st: &SectionText<'_>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for OwnedSectionText
impl Send for OwnedSectionText
impl Sync for OwnedSectionText
impl Unpin for OwnedSectionText
impl UnwindSafe for OwnedSectionText
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