pub struct DashPathEffect { /* private fields */ }Expand description
Dashes along a stroke: on for the first interval, off for the second,
and so on, starting phase into the pattern. Compose’s
PathEffect.dashPathEffect(intervals, phase). Up to
DashPathEffect::MAX_INTERVALS intervals; a pattern with an odd
count or a non-positive sum draws the stroke whole, as Skia does.
Implementations§
Source§impl DashPathEffect
impl DashPathEffect
Sourcepub const MAX_INTERVALS: usize = 8
pub const MAX_INTERVALS: usize = 8
The most intervals a pattern holds.
Sourcepub fn new(intervals: &[f32], phase: f32) -> DashPathEffect
pub fn new(intervals: &[f32], phase: f32) -> DashPathEffect
A dash pattern of intervals, the extras past
Self::MAX_INTERVALS dropped, starting phase into it.
Sourcepub fn for_each_dash(&self, points: &[Point], dash: impl FnMut(&[Point]))
pub fn for_each_dash(&self, points: &[Point], dash: impl FnMut(&[Point]))
Hands dash each dash of the polyline through points in turn, as
a polyline of its own; the whole polyline when the pattern draws it
whole.
Trait Implementations§
Source§impl Clone for DashPathEffect
impl Clone for DashPathEffect
Source§fn clone(&self) -> DashPathEffect
fn clone(&self) -> DashPathEffect
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 moreimpl Copy for DashPathEffect
Source§impl Debug for DashPathEffect
impl Debug for DashPathEffect
Source§impl PartialEq for DashPathEffect
impl PartialEq for DashPathEffect
impl StructuralPartialEq for DashPathEffect
Auto Trait Implementations§
impl Freeze for DashPathEffect
impl RefUnwindSafe for DashPathEffect
impl Send for DashPathEffect
impl Sync for DashPathEffect
impl Unpin for DashPathEffect
impl UnsafeUnpin for DashPathEffect
impl UnwindSafe for DashPathEffect
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