pub struct Decoration {}Expand description
One block: what it paints, and where it sits around the fragments it spans.
Fields§
§node: NodeIdThe content node the block stands for.
paints: boolWhether the block paints a background or a border. A block that paints neither still has a border box to answer for.
x: f32Leading edge of the border box, from the content box’s own.
width: f32Width of the border box.
above: f32Distance from the top of the block’s first fragment up to the top of its border box.
below: f32Distance from the bottom of its last fragment down to the bottom of its border box.
border: EdgesBorder widths, zero on an edge that is not drawn.
colors: Edges<Color>What each edge is painted in, currentColor resolved.
radius: BorderRadiusHow far each corner of the border box is rounded, before the box’s own size is known.
cloned: boolWhether box-decoration-break: clone closes the two edges a
page break cuts.
layer: i32The layer the border box paints in, from the block’s
z-index.
offset: (f32, f32)How far position: relative moves the border box, across and
down.
opacity: f32How much of what the border box paints shows, from 0 to 1: the
opacity of the block and the blocks around it, multiplied
together.
Trait Implementations§
Source§impl Clone for Decoration
impl Clone for Decoration
Source§fn clone(&self) -> Decoration
fn clone(&self) -> Decoration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for Decoration
impl RefUnwindSafe for Decoration
impl Send for Decoration
impl Sync for Decoration
impl Unpin for Decoration
impl UnsafeUnpin for Decoration
impl UnwindSafe for Decoration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.