[−][src]Struct gfx_glyph::Text
SectionText
+ extra.
Fields
text: &'a str
Text to render
scale: PxScale
Position on screen to render text, in pixels from top-left. Defaults to (0, 0).
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
impl<'a, X> Text<'a, X>
[src]
pub fn with_text(self, text: &str) -> Text<X>
[src]
pub fn with_scale<S>(self, scale: S) -> Text<'a, X> where
S: Into<PxScale>,
[src]
S: Into<PxScale>,
pub fn with_font_id<F>(self, font_id: F) -> Text<'a, X> where
F: Into<FontId>,
[src]
F: Into<FontId>,
pub fn with_extra<X2>(self, extra: X2) -> Text<'a, X2>
[src]
impl<'a> Text<'a, Extra>
[src]
pub fn new(text: &'a str) -> Text<'a, Extra>
[src]
pub fn with_color<C>(self, color: C) -> Text<'a, Extra> where
C: Into<[f32; 4]>,
[src]
C: Into<[f32; 4]>,
pub fn with_z<Z>(self, z: Z) -> Text<'a, Extra> where
Z: Into<f32>,
[src]
Z: Into<f32>,
Trait Implementations
impl<'a, X> Clone for Text<'a, X> where
X: Clone,
[src]
X: Clone,
impl<'a, X> Copy for Text<'a, X> where
X: Copy,
[src]
X: Copy,
impl<'a, X> Debug for Text<'a, X> where
X: Debug,
[src]
X: Debug,
impl<X> Default for Text<'static, X> where
X: Default,
[src]
X: Default,
impl<'_, '_, X> From<&'_ Text<'_, X>> for OwnedText<X> where
X: Clone,
[src]
X: Clone,
impl<'a, '_> From<&'_ Text<'a, Extra>> for SectionText<'a>
[src]
fn from(t: &Text<'a, Extra>) -> SectionText<'a>
[src]
impl<'a, X> From<&'a OwnedText<X>> for Text<'a, X> where
X: Clone,
[src]
X: Clone,
impl<'a> From<Text<'a, Extra>> for SectionText<'a>
[src]
fn from(t: Text<'a, Extra>) -> SectionText<'a>
[src]
impl<'a, X> PartialEq<Text<'a, X>> for Text<'a, X> where
X: PartialEq<X>,
[src]
X: PartialEq<X>,
impl<'a, X> StructuralPartialEq for Text<'a, X>
[src]
impl<'_, X> ToSectionText for Text<'_, X>
[src]
fn to_section_text(&self) -> SectionText
[src]
Auto Trait Implementations
impl<'a, X> RefUnwindSafe for Text<'a, X> where
X: RefUnwindSafe,
X: RefUnwindSafe,
impl<'a, X> Send for Text<'a, X> where
X: Send,
X: Send,
impl<'a, X> Sync for Text<'a, X> where
X: Sync,
X: Sync,
impl<'a, X> Unpin for Text<'a, X> where
X: Unpin,
X: Unpin,
impl<'a, X> UnwindSafe for Text<'a, X> where
X: UnwindSafe,
X: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,