pub enum TextDecoration {
Underline {
color: Rgba8,
thickness: f32,
offset: f32,
},
Overline {
color: Rgba8,
thickness: f32,
offset: f32,
},
Strikethrough {
color: Rgba8,
thickness: f32,
},
}Expand description
A text decoration style applied to a run of text.
Describes the visual decoration (underline, overline, or strikethrough) and
its rendering parameters. Used with LayoutOptions::decoration to
produce DecorationRects from a layout pass.
Variants§
Underline
Underline drawn below the text baseline.
Fields
Overline
Overline drawn above the ascender line.
Fields
Strikethrough
Strikethrough drawn through the middle of the text (at x-height midpoint).
Trait Implementations§
Source§impl Clone for TextDecoration
impl Clone for TextDecoration
Source§fn clone(&self) -> TextDecoration
fn clone(&self) -> TextDecoration
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 moreSource§impl Debug for TextDecoration
impl Debug for TextDecoration
Source§impl PartialEq for TextDecoration
impl PartialEq for TextDecoration
Source§fn eq(&self, other: &TextDecoration) -> bool
fn eq(&self, other: &TextDecoration) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TextDecoration
impl StructuralPartialEq for TextDecoration
Auto Trait Implementations§
impl Freeze for TextDecoration
impl RefUnwindSafe for TextDecoration
impl Send for TextDecoration
impl Sync for TextDecoration
impl Unpin for TextDecoration
impl UnsafeUnpin for TextDecoration
impl UnwindSafe for TextDecoration
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