pub struct DecorationSpan {
pub glyph_range: Range<usize>,
pub data: GlyphDecorationData,
pub color_opt: Option<Color>,
pub font_size: f32,
}Expand description
A span of consecutive glyphs sharing the same text decoration.
Fields§
§glyph_range: Range<usize>Range of glyph indices in LayoutLine::glyphs covered by this span
data: GlyphDecorationDataThe decoration config and metrics
color_opt: Option<Color>Fallback color from the first glyph’s color_opt
font_size: f32Font size from the first glyph (used to scale EM-unit metrics)
Trait Implementations§
Source§impl Clone for DecorationSpan
impl Clone for DecorationSpan
Source§fn clone(&self) -> DecorationSpan
fn clone(&self) -> DecorationSpan
Returns a duplicate of the value. Read more
1.0.0 · 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 DecorationSpan
impl Debug for DecorationSpan
Source§impl PartialEq for DecorationSpan
impl PartialEq for DecorationSpan
impl StructuralPartialEq for DecorationSpan
Auto Trait Implementations§
impl Freeze for DecorationSpan
impl RefUnwindSafe for DecorationSpan
impl Send for DecorationSpan
impl Sync for DecorationSpan
impl Unpin for DecorationSpan
impl UnwindSafe for DecorationSpan
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