pub struct DashPattern {
pub dashes: Vec<f64>,
pub offset: f64,
}Expand description
A dash pattern for stroked paths.
Fields§
§dashes: Vec<f64>Alternating dash/gap lengths.
offset: f64Offset into the pattern.
Implementations§
Source§impl DashPattern
impl DashPattern
Sourcepub fn new(dashes: &[f64]) -> DashPattern
pub fn new(dashes: &[f64]) -> DashPattern
Create a new dash pattern.
Sourcepub fn to_svg_string(&self) -> String
pub fn to_svg_string(&self) -> String
Format as an SVG stroke-dasharray attribute value.
Trait Implementations§
Source§impl Clone for DashPattern
impl Clone for DashPattern
Source§fn clone(&self) -> DashPattern
fn clone(&self) -> DashPattern
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 DashPattern
impl Debug for DashPattern
Source§impl PartialEq for DashPattern
impl PartialEq for DashPattern
Source§fn eq(&self, other: &DashPattern) -> bool
fn eq(&self, other: &DashPattern) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DashPattern
Auto Trait Implementations§
impl Freeze for DashPattern
impl RefUnwindSafe for DashPattern
impl Send for DashPattern
impl Sync for DashPattern
impl Unpin for DashPattern
impl UnsafeUnpin for DashPattern
impl UnwindSafe for DashPattern
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