pub struct TextStyle {
pub color: Color,
pub size_px: f32,
pub align: TextAlign,
pub baseline: TextBaseline,
pub rotation_deg: f64,
pub bold: bool,
pub italic: bool,
}Fields§
§color: Color§size_px: f32§align: TextAlign§baseline: TextBaseline§rotation_deg: f64Clockwise degrees in screen space (y-down). Use -90.0 for classic y-axis labels.
bold: boolHeavier stem coverage (contour clabels). Default body text stays regular.
italic: boolOblique / italic face (mathtext variables; matplotlib math default).
Implementations§
Source§impl TextStyle
impl TextStyle
pub fn new(color: Color, size_px: f32) -> Self
pub fn centered(self) -> Self
pub fn align(self, align: TextAlign) -> Self
pub fn baseline(self, baseline: TextBaseline) -> Self
pub fn rotation(self, degrees: f64) -> Self
pub fn bold(self, bold: bool) -> Self
pub fn italic(self, italic: bool) -> Self
Trait Implementations§
impl StructuralPartialEq for TextStyle
Auto Trait Implementations§
impl Freeze for TextStyle
impl RefUnwindSafe for TextStyle
impl Send for TextStyle
impl Sync for TextStyle
impl Unpin for TextStyle
impl UnsafeUnpin for TextStyle
impl UnwindSafe for TextStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more