pub struct Stroke<'a> {
pub color: Color,
pub width: f32,
pub line_cap: LineCap,
pub line_join: LineJoin,
pub line_dash: LineDash<'a>,
}
Available on crate feature
pure
only.Expand description
The style of a stroke.
Fields
color: Color
The color of the stroke.
width: f32
The distance between the two edges of the stroke.
line_cap: LineCap
The shape to be used at the end of open subpaths when they are stroked.
line_join: LineJoin
The shape to be used at the corners of paths or basic shapes when they are stroked.
line_dash: LineDash<'a>
The dash pattern used when stroking the line.
Implementations
sourceimpl<'a> Stroke<'a>
impl<'a> Stroke<'a>
sourcepub fn with_color(self, color: Color) -> Stroke<'a>
Available on crate feature canvas
only.
pub fn with_color(self, color: Color) -> Stroke<'a>
canvas
only.Sets the color of the Stroke
.
sourcepub fn with_width(self, width: f32) -> Stroke<'a>
Available on crate feature canvas
only.
pub fn with_width(self, width: f32) -> Stroke<'a>
canvas
only.Sets the width of the Stroke
.
sourcepub fn with_line_cap(self, line_cap: LineCap) -> Stroke<'a>
Available on crate feature canvas
only.
pub fn with_line_cap(self, line_cap: LineCap) -> Stroke<'a>
canvas
only.Trait Implementations
impl<'a> Copy for Stroke<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Stroke<'a>
impl<'a> Send for Stroke<'a>
impl<'a> Sync for Stroke<'a>
impl<'a> Unpin for Stroke<'a>
impl<'a> UnwindSafe for Stroke<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more