1use crate::{prelude::*, scalar, PathEffect};
2use skia_bindings as sb;
3
4impl PathEffect {
5 pub fn dash(intervals: &[scalar], phase: scalar) -> Option<Self> {
6 new(intervals, phase)
7 }
8}
9
10pub fn new(intervals: &[scalar], phase: scalar) -> Option<PathEffect> {
11 PathEffect::from_ptr(unsafe {
12 sb::C_SkDashPathEffect_Make(
13 intervals:intervals.as_ptr(),
14 count:intervals.len().try_into().unwrap(),
15 phase,
16 )
17 })
18}
19