pub struct TextPaint {
pub plain: bool,
pub color: Color,
pub baseline_shift: f32,
pub style_hash: u64,
}Expand description
The paint of a text node’s glyphs.
Fields§
§plain: boolWhether the glyphs in color are all the text draws: no background,
shadow, brush, stroke or decoration, and no span that paints its own
range.
color: ColorThe style’s colour, or its solid brush, times its alpha; white when it names neither.
baseline_shift: f32How far the style’s baseline shift moves the glyphs down.
style_hash: u64The style’s TextStyle::render_hash, which keys the glyph caches
a renderer draws the text from, so no frame hashes the style again.
Implementations§
Trait Implementations§
impl Copy for TextPaint
impl StructuralPartialEq for TextPaint
Auto Trait Implementations§
impl Freeze for TextPaint
impl RefUnwindSafe for TextPaint
impl Send for TextPaint
impl Sync for TextPaint
impl Unpin for TextPaint
impl UnsafeUnpin for TextPaint
impl UnwindSafe for TextPaint
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