Trait primitives::prelude::TextStyle
source · [−]pub trait TextStyle {
Show 20 methods
fn font(&self) -> String;
fn set_font(&self, val: String);
fn size(&self) -> f32;
fn set_size(&self, val: f32);
fn color(&self) -> i32;
fn set_color(&self, val: i32);
fn align(&self) -> TextAlign;
fn set_align(&self, val: TextAlign);
fn spacing_horizontal(&self) -> f32;
fn set_spacing_horizontal(&self, val: f32);
fn spacing_vertical(&self) -> f32;
fn set_spacing_vertical(&self, val: f32);
fn is_bold(&self) -> bool;
fn set_bold(&self, val: bool);
fn is_italic(&self) -> bool;
fn set_italic(&self, val: bool);
fn thickness(&self) -> f32;
fn set_thickness(&self, val: f32);
fn to_string(&self) -> String;
fn clone(&self) -> Box<dyn TextStyle>;
}
Expand description
The TextStyle should be implemented by objects created by the createTextStyle method of Factory
.
Required Methods
fn spacing_horizontal(&self) -> f32
fn spacing_horizontal(&self) -> f32
Space in pixels added between each character.
fn set_spacing_horizontal(&self, val: f32)
fn set_spacing_horizontal(&self, val: f32)
Set the space in pixels added between each character.
fn spacing_vertical(&self) -> f32
fn spacing_vertical(&self) -> f32
Space in pixels added between each new line (often called leading).
fn set_spacing_vertical(&self, val: f32)
fn set_spacing_vertical(&self, val: f32)
Set the space in pixels added between each new line (often called leading).
fn set_italic(&self, val: bool)
fn set_italic(&self, val: bool)
Set the font emphasis.
Thickness of the glyph edges of this font. Range: -1…1. Default is 0.
fn set_thickness(&self, val: f32)
fn set_thickness(&self, val: f32)
Set the thickness of the glyph edges of this font. Range: -1…1. Default is 0.
String representation of this object.
Return: Representation of this object.