Struct glyph_brush::Text
source · pub struct Text<'a, X = Extra> {
pub text: &'a str,
pub scale: PxScale,
pub font_id: FontId,
pub extra: X,
}
Expand description
SectionText
+ extra.
Fields§
§text: &'a str
Text to render.
scale: PxScale
Pixel scale of text. Defaults to 16.
font_id: FontId
Font id to use for this section.
It must be a valid id in the FontMap
used for layout calls.
The default FontId(0)
should always be valid.
extra: X
Extra stuff for vertex generation.
Implementations§
Trait Implementations§
source§impl<'a> From<&Text<'a>> for SectionText<'a>
impl<'a> From<&Text<'a>> for SectionText<'a>
source§impl<'a> From<Text<'a>> for SectionText<'a>
impl<'a> From<Text<'a>> for SectionText<'a>
source§impl<'a, X: PartialEq> PartialEq for Text<'a, X>
impl<'a, X: PartialEq> PartialEq for Text<'a, X>
source§impl<X> ToSectionText for Text<'_, X>
impl<X> ToSectionText for Text<'_, X>
fn to_section_text(&self) -> SectionText<'_>
impl<'a, X: Copy> Copy for Text<'a, X>
impl<'a, X> StructuralPartialEq for Text<'a, X>
Auto Trait Implementations§
impl<'a, X> RefUnwindSafe for Text<'a, X>where X: RefUnwindSafe,
impl<'a, X> Send for Text<'a, X>where X: Send,
impl<'a, X> Sync for Text<'a, X>where X: Sync,
impl<'a, X> Unpin for Text<'a, X>where X: Unpin,
impl<'a, X> UnwindSafe for Text<'a, X>where X: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more