Enum piet::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§
source§impl Clone for TextAttribute
impl Clone for TextAttribute
source§fn clone(&self) -> TextAttribute
fn clone(&self) -> TextAttribute
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TextAttribute
impl Debug for TextAttribute
source§impl From<FontFamily> for TextAttribute
impl From<FontFamily> for TextAttribute
source§fn from(t: FontFamily) -> TextAttribute
fn from(t: FontFamily) -> TextAttribute
Converts to this type from the input type.
source§impl From<FontStyle> for TextAttribute
impl From<FontStyle> for TextAttribute
source§fn from(src: FontStyle) -> TextAttribute
fn from(src: FontStyle) -> TextAttribute
Converts to this type from the input type.
source§impl From<FontWeight> for TextAttribute
impl From<FontWeight> for TextAttribute
source§fn from(src: FontWeight) -> TextAttribute
fn from(src: FontWeight) -> TextAttribute
Converts to this type from the input type.