pub struct StrokeStyle {
pub width: f64,
pub cap: LineCap,
pub join: LineJoin,
pub miter_limit: f64,
pub dash: Vec<f64>,
pub dash_phase: f64,
}Expand description
Everything about a stroke except its paint.
StrokeStyle::width and From<f64> keep the common “just a width” case a single
argument, so plain stroke(shape, color, 2.0) call sites read the same as they always did.
Fields§
§width: f64§cap: LineCap§join: LineJoin§miter_limit: f64Ignored unless join is LineJoin::Miter. The 2-D convention: past this ratio of miter
length to line width the join falls back to a bevel.
dash: Vec<f64>On/off run lengths, repeating. Empty means solid.
dash_phase: f64How far into the dash pattern the line starts.
Implementations§
Trait Implementations§
Source§impl Clone for StrokeStyle
impl Clone for StrokeStyle
Source§fn clone(&self) -> StrokeStyle
fn clone(&self) -> StrokeStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StrokeStyle
impl Debug for StrokeStyle
Source§impl Default for StrokeStyle
impl Default for StrokeStyle
Source§impl From<f64> for StrokeStyle
impl From<f64> for StrokeStyle
Source§impl PartialEq for StrokeStyle
impl PartialEq for StrokeStyle
impl StructuralPartialEq for StrokeStyle
Auto Trait Implementations§
impl Freeze for StrokeStyle
impl RefUnwindSafe for StrokeStyle
impl Send for StrokeStyle
impl Sync for StrokeStyle
impl Unpin for StrokeStyle
impl UnsafeUnpin for StrokeStyle
impl UnwindSafe for StrokeStyle
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