logo
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

The name of the font, as a string.

Set the name of the font, as a string.

The point size of text.

Set the point size of text.

The color of the text.

Set the color of the text.

Font horizontal alignment.

Set the font horizontal alignment.

Space in pixels added between each character.

Set the space in pixels added between each character.

Space in pixels added between each new line (often called leading).

Set the space in pixels added between each new line (often called leading).

Font weight.

Set the font weight.

Font emphasis.

Set the font emphasis.

Thickness of the glyph edges of this font. Range: -1…1. Default is 0.

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.

Duplicates this TextStyle.

Return: A duplicate.

Implementors