Enum piet_common::TextAttribute
source · pub enum TextAttribute {
FontFamily(FontFamily),
FontSize(f64),
Weight(FontWeight),
TextColor(Color),
Style(FontStyle),
Underline(bool),
Strikethrough(bool),
}Expand description
Attributes that can be applied to text.
Variants
FontFamily(FontFamily)
The font family.
FontSize(f64)
The font size, in points.
Weight(FontWeight)
The FontWeight.
TextColor(Color)
The foreground color of the text.
Style(FontStyle)
The FontStyle; either regular or italic.
Underline(bool)
Underline.
Strikethrough(bool)
Strikethrough.
Trait Implementations
sourceimpl Clone for TextAttribute
impl Clone for TextAttribute
sourcefn clone(&self) -> TextAttribute
fn clone(&self) -> TextAttribute
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 TextAttribute
impl Debug for TextAttribute
sourceimpl From<FontFamily> for TextAttribute
impl From<FontFamily> for TextAttribute
sourcefn from(t: FontFamily) -> TextAttribute
fn from(t: FontFamily) -> TextAttribute
Converts to this type from the input type.
sourceimpl From<FontStyle> for TextAttribute
impl From<FontStyle> for TextAttribute
sourcefn from(src: FontStyle) -> TextAttribute
fn from(src: FontStyle) -> TextAttribute
Converts to this type from the input type.
sourceimpl From<FontWeight> for TextAttribute
impl From<FontWeight> for TextAttribute
sourcefn from(src: FontWeight) -> TextAttribute
fn from(src: FontWeight) -> TextAttribute
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for TextAttribute
impl Send for TextAttribute
impl Sync for TextAttribute
impl Unpin for TextAttribute
impl UnwindSafe for TextAttribute
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
sourceimpl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
sourcefn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
sourceimpl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
sourcefn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.