pub struct RectStyle {
pub fill: Option<Paint>,
pub stroke: Option<Stroke>,
pub shadow: Option<Shadow>,
pub radius: BorderRadius,
pub border_widths: BorderWidths,
}Fields§
§fill: Option<Paint>§stroke: Option<Stroke>§shadow: Option<Shadow>§radius: BorderRadius§border_widths: BorderWidthsWhich sides of the border are drawn and how thick each is; see BorderWidths. Read it through
border rather than directly, so the uniform case resolves against stroke.width.
Implementations§
Source§impl RectStyle
impl RectStyle
pub fn filled(color: Color, radius: f32) -> Self
pub fn with_radius(self, radius: BorderRadius) -> Self
Sourcepub fn with_border_widths(self, widths: BorderWidths) -> Self
pub fn with_border_widths(self, widths: BorderWidths) -> Self
Draws the stroke on the named sides only, at the named thicknesses. See BorderWidths.
Trait Implementations§
impl Copy for RectStyle
Source§impl ShapeStyle for RectStyle
impl ShapeStyle for RectStyle
fn fill_mut(&mut self) -> &mut Option<Paint>
fn stroke_mut(&mut self) -> &mut Option<Stroke>
fn shadow_mut(&mut self) -> &mut Option<Shadow>
fn with_fill(self, fill: impl Into<Paint>) -> Self
fn with_stroke(self, stroke: Stroke) -> Self
fn with_shadow(self, shadow: Shadow) -> Self
impl StructuralPartialEq for RectStyle
Auto Trait Implementations§
impl Freeze for RectStyle
impl RefUnwindSafe for RectStyle
impl Send for RectStyle
impl Sync for RectStyle
impl Unpin for RectStyle
impl UnsafeUnpin for RectStyle
impl UnwindSafe for RectStyle
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