pub struct TextAnnotation {
pub text: String,
pub x: f64,
pub y: f64,
pub fontsize: Option<f64>,
pub color: Option<Color>,
pub ha: HAlign,
pub va: VAlign,
pub rotation: f64,
}Expand description
A text label placed at a data-space coordinate.
Created by [Axes::text]. Supports builder-style chaining to customise
font size, color, alignment, and rotation.
Fields§
§text: StringThe text string to render.
x: f64X position in data coordinates.
y: f64Y position in data coordinates.
fontsize: Option<f64>Optional font size override (in points). None uses the theme default.
color: Option<Color>Optional text color override. None uses the theme text color.
ha: HAlignHorizontal alignment of the text relative to (x, y).
va: VAlignVertical alignment of the text relative to (x, y).
rotation: f64Rotation angle in degrees (counter-clockwise).
Implementations§
Trait Implementations§
Source§impl Clone for TextAnnotation
impl Clone for TextAnnotation
Source§fn clone(&self) -> TextAnnotation
fn clone(&self) -> TextAnnotation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TextAnnotation
impl RefUnwindSafe for TextAnnotation
impl Send for TextAnnotation
impl Sync for TextAnnotation
impl Unpin for TextAnnotation
impl UnsafeUnpin for TextAnnotation
impl UnwindSafe for TextAnnotation
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