pub struct PaintSpan {
pub char_start: usize,
pub char_end: usize,
pub foreground_color: Option<[f32; 4]>,
pub underline_color: Option<[f32; 4]>,
pub background_color: Option<[f32; 4]>,
pub underline_style: Option<UnderlineStyle>,
pub overline: Option<bool>,
pub strikeout: Option<bool>,
}Expand description
A resolved paint-only color overlay span for one character range of a block.
char_start/char_end are block-relative character offsets — the same
space as the post-layout ShapedGlyph::cluster values (see
break_into_lines, which converts clusters to char offsets). Each field is
None when the overlay does not override it (the base run’s value is kept).
Applying paint spans never changes glyph geometry, advances, or line breaks
— only color / decoration attributes — so the layout does not reflow.
Fields§
§char_start: usize§char_end: usize§foreground_color: Option<[f32; 4]>§underline_color: Option<[f32; 4]>§background_color: Option<[f32; 4]>§underline_style: Option<UnderlineStyle>§overline: Option<bool>§strikeout: Option<bool>Trait Implementations§
impl StructuralPartialEq for PaintSpan
Auto Trait Implementations§
impl Freeze for PaintSpan
impl RefUnwindSafe for PaintSpan
impl Send for PaintSpan
impl Sync for PaintSpan
impl Unpin for PaintSpan
impl UnsafeUnpin for PaintSpan
impl UnwindSafe for PaintSpan
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