pub struct TextBackground {
pub color: Color,
pub radius: Points,
pub node: NodeId,
pub top: Points,
pub bottom: Points,
}Expand description
The background of a nested <Text> (backgroundColor and
borderRadius on a span): drawing only, behind its characters and
those of the spans inside it, on each line it reaches as the font’s
ascent to descent around the baseline (as CSS paints inline boxes),
every line’s box rounded alike (box-decoration-break: clone).
Fields§
§color: ColorFill color (never fully transparent).
radius: PointsCorner radius.
node: NodeIdThe span that set it, so neighboring spans that look the same still get a box each.
top: PointsRoom above the font’s ascent (the span’s top padding): drawing only, as a CSS inline box’s vertical padding, the line keeps its height.
bottom: PointsRoom below the font’s descent (the span’s bottom padding).
Trait Implementations§
Source§impl Clone for TextBackground
impl Clone for TextBackground
impl Copy for TextBackground
Source§impl Debug for TextBackground
impl Debug for TextBackground
Source§impl PartialEq for TextBackground
impl PartialEq for TextBackground
impl StructuralPartialEq for TextBackground
Auto Trait Implementations§
impl Forget for TextBackground
impl Freeze for TextBackground
impl Move for TextBackground
impl RefUnwindSafe for TextBackground
impl Send for TextBackground
impl Sync for TextBackground
impl Unpin for TextBackground
impl UnsafeUnpin for TextBackground
impl UnwindSafe for TextBackground
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