pub struct PaintQuad {
pub bounds: Bounds<Pixels>,
pub corner_radii: Corners<Pixels>,
pub background: Background,
pub border_widths: Edges<Pixels>,
pub border_color: Hsla,
pub border_style: BorderStyle,
}Expand description
A rectangle to be rendered in the window at the given position and size.
Passed as an argument Window::paint_quad.
Fields§
§bounds: Bounds<Pixels>The bounds of the quad within the window.
corner_radii: Corners<Pixels>The radii of the quad’s corners.
background: BackgroundThe background color of the quad.
border_widths: Edges<Pixels>The widths of the quad’s borders.
border_color: HslaThe color of the quad’s borders.
border_style: BorderStyleThe style of the quad’s borders.
Implementations§
Source§impl PaintQuad
impl PaintQuad
Sourcepub fn corner_radii(self, corner_radii: impl Into<Corners<Pixels>>) -> Self
pub fn corner_radii(self, corner_radii: impl Into<Corners<Pixels>>) -> Self
Sets the corner radii of the quad.
Sourcepub fn border_widths(self, border_widths: impl Into<Edges<Pixels>>) -> Self
pub fn border_widths(self, border_widths: impl Into<Edges<Pixels>>) -> Self
Sets the border widths of the quad.
Sourcepub fn border_color(self, border_color: impl Into<Hsla>) -> Self
pub fn border_color(self, border_color: impl Into<Hsla>) -> Self
Sets the border color of the quad.
Sourcepub fn background(self, background: impl Into<Background>) -> Self
pub fn background(self, background: impl Into<Background>) -> Self
Sets the background color of the quad.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PaintQuad
impl RefUnwindSafe for PaintQuad
impl Send for PaintQuad
impl Sync for PaintQuad
impl Unpin for PaintQuad
impl UnwindSafe for PaintQuad
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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