pub struct TernaryText { /* private fields */ }Expand description
A text annotation anchored in ternary composition space.
Content and style are owned. Pixel offsets are applied after projection and are final-output pixels, so geometry supersampling never changes their final placement.
Implementations§
Source§impl TernaryText
impl TernaryText
Sourcepub fn new<S: Into<String>>(point: TernaryPoint, text: S) -> Self
pub fn new<S: Into<String>>(point: TernaryPoint, text: S) -> Self
Create a final-resolution, centred, anchor-clipped annotation.
Sourcepub fn style(self, style: AnnotationTextStyle) -> Self
pub fn style(self, style: AnnotationTextStyle) -> Self
Set the owned text attributes.
Sourcepub const fn anchor(self, anchor: TextAnchor) -> Self
pub const fn anchor(self, anchor: TextAnchor) -> Self
Set the local horizontal/vertical anchor.
Sourcepub const fn offset(self, offset: (i32, i32)) -> Self
pub const fn offset(self, offset: (i32, i32)) -> Self
Set a final-output-pixel offset from the projected ternary anchor.
Sourcepub const fn clip_mode(self, clip_mode: AnnotationClipMode) -> Self
pub const fn clip_mode(self, clip_mode: AnnotationClipMode) -> Self
Select anchor clipping or unrestricted submission.
Sourcepub const fn rotation(self, rotation: TextRotation) -> Self
pub const fn rotation(self, rotation: TextRotation) -> Self
Use only a Plotters-native quarter-turn text transform.
Sourcepub const fn normalization(self, normalization: Normalization) -> Self
pub const fn normalization(self, normalization: Normalization) -> Self
Select explicit validation or normalisation.
Sourcepub const fn tolerance(self, tolerance: Tolerance) -> Self
pub const fn tolerance(self, tolerance: Tolerance) -> Self
Select the tolerance for validation and anchor clipping.
pub const fn point(&self) -> TernaryPoint
pub fn text(&self) -> &str
pub const fn offset_value(&self) -> (i32, i32)
pub const fn text_anchor(&self) -> TextAnchor
pub const fn annotation_clip_mode(&self) -> AnnotationClipMode
Trait Implementations§
impl<DB> TernarySeries<DB> for TernaryTextwhere
DB: DrawingBackend,
Auto Trait Implementations§
impl Freeze for TernaryText
impl RefUnwindSafe for TernaryText
impl Send for TernaryText
impl Sync for TernaryText
impl Unpin for TernaryText
impl UnsafeUnpin for TernaryText
impl UnwindSafe for TernaryText
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