pub struct TextBackground {
pub color: [u8; 4],
pub padding: [f32; 4],
pub radius: f32,
pub border: Option<TextBoxBorder>,
pub extent: BoxExtent,
}Expand description
A box behind each non-empty line: its advance by its em box, grown by padding, with a
radius and a border. Overlapping boxes show their union with one outline.
Fields§
§color: [u8; 4]Straight sRGB RGBA.
padding: [f32; 4]Space between the text and the box edge in pixels, top first, clockwise, each in
[0, 256].
radius: f32Every corner’s radius in pixels, capped at half the box’s shorter side.
border: Option<TextBoxBorder>A border inside the box’s edge.
extent: BoxExtentWhich part of each line the box spans.
Implementations§
Trait Implementations§
Source§impl Clone for TextBackground
impl Clone 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 TextBackgroundwhere
RawVecInner: Send,
impl Sync for TextBackgroundwhere
RawVecInner: Sync,
impl Unpin for TextBackground
impl UnsafeUnpin for TextBackground
impl UnwindSafe for TextBackgroundwhere
RawVecInner: UnwindSafe,
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