pub struct Stroke {
pub width: f64,
pub join: Join,
pub miter_limit: f64,
pub start_cap: Cap,
pub end_cap: Cap,
pub dash_pattern: Dashes,
pub dash_offset: f64,
}
Expand description
Describes the visual style of a stroke.
Fields§
§width: f64
Width of the stroke.
join: Join
Style for connecting segments of the stroke.
miter_limit: f64
Limit for miter joins.
start_cap: Cap
Style for capping the beginning of an open subpath.
end_cap: Cap
Style for capping the end of an open subpath.
dash_pattern: Dashes
Lengths of dashes in alternating on/off order.
dash_offset: f64
Offset of the first dash.
Implementations§
source§impl Stroke
impl Stroke
sourcepub fn with_miter_limit(self, limit: f64) -> Self
pub fn with_miter_limit(self, limit: f64) -> Self
Builder method for setting the limit for miter joins.
sourcepub fn with_start_cap(self, cap: Cap) -> Self
pub fn with_start_cap(self, cap: Cap) -> Self
Builder method for setting the cap style for the start of the stroke.
sourcepub fn with_end_cap(self, cap: Cap) -> Self
pub fn with_end_cap(self, cap: Cap) -> Self
Builder method for setting the cap style for the end of the stroke.
sourcepub fn with_dashes<P>(self, offset: f64, pattern: P) -> Self
pub fn with_dashes<P>(self, offset: f64, pattern: P) -> Self
Builder method for setting the dashing parameters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Stroke
impl RefUnwindSafe for Stroke
impl Send for Stroke
impl Sync for Stroke
impl Unpin for Stroke
impl UnwindSafe for Stroke
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)