pub struct ShapeStyle { /* private fields */ }Expand description
Fill, stroke, and shadow styling for solid primitives.
Implementations§
Source§impl ShapeStyle
impl ShapeStyle
Sourcepub const fn new(
fill: Option<Fill>,
stroke: Option<Stroke>,
shadow: Option<Shadow>,
) -> Self
pub const fn new( fill: Option<Fill>, stroke: Option<Stroke>, shadow: Option<Shadow>, ) -> Self
Builds explicit fill, stroke, and shadow choices.
Sourcepub fn filled_with(fill: Fill) -> Self
pub fn filled_with(fill: Fill) -> Self
Creates a style with fill paint only.
Sourcepub fn stroked(width: f32, color: Color) -> Self
pub fn stroked(width: f32, color: Color) -> Self
Creates a style with stroke only.
width is in logical screen pixels.
Sourcepub fn fill_stroke(fill: Color, stroke_width: f32, stroke: Color) -> Self
pub fn fill_stroke(fill: Color, stroke_width: f32, stroke: Color) -> Self
Creates a style with both fill and stroke.
stroke_width is in logical screen pixels.
Sourcepub fn fill_stroke_with(fill: Fill, stroke_width: f32, stroke: Color) -> Self
pub fn fill_stroke_with(fill: Fill, stroke_width: f32, stroke: Color) -> Self
Creates a style with both fill paint and stroke.
stroke_width is in logical screen pixels.
Sourcepub fn with_shadow(self, shadow: Shadow) -> Self
pub fn with_shadow(self, shadow: Shadow) -> Self
Adds a shadow to the style.
Trait Implementations§
Source§impl Clone for ShapeStyle
impl Clone for ShapeStyle
impl Copy for ShapeStyle
Source§impl Debug for ShapeStyle
impl Debug for ShapeStyle
Source§impl PartialEq for ShapeStyle
impl PartialEq for ShapeStyle
impl StructuralPartialEq for ShapeStyle
Auto Trait Implementations§
impl Freeze for ShapeStyle
impl RefUnwindSafe for ShapeStyle
impl Send for ShapeStyle
impl Sync for ShapeStyle
impl Unpin for ShapeStyle
impl UnsafeUnpin for ShapeStyle
impl UnwindSafe for ShapeStyle
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