pub struct DecorationRect {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub color: Rgba8,
}Expand description
A positioned decoration rectangle ready to be composited onto the output canvas.
Produced by the layout engine when LayoutOptions::decoration is set.
The caller is responsible for painting the rectangle (e.g. by calling
RenderResult::composite_to_rgba which applies decorations
automatically).
Fields§
§x: f32Left edge in canvas pixels.
y: f32Top edge in canvas pixels.
width: f32Width in canvas pixels.
height: f32Height in canvas pixels (equals the decoration thickness).
color: Rgba8Color of the decoration.
Trait Implementations§
Source§impl Clone for DecorationRect
impl Clone for DecorationRect
Source§fn clone(&self) -> DecorationRect
fn clone(&self) -> DecorationRect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DecorationRect
impl Debug for DecorationRect
Source§impl PartialEq for DecorationRect
impl PartialEq for DecorationRect
Source§fn eq(&self, other: &DecorationRect) -> bool
fn eq(&self, other: &DecorationRect) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for DecorationRect
impl StructuralPartialEq for DecorationRect
Auto Trait Implementations§
impl Freeze for DecorationRect
impl RefUnwindSafe for DecorationRect
impl Send for DecorationRect
impl Sync for DecorationRect
impl Unpin for DecorationRect
impl UnsafeUnpin for DecorationRect
impl UnwindSafe for DecorationRect
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more