1use crate::{scalar, PathEffect};
2use skia_bindings as sb;
3
4impl PathEffect {
5 pub fn discrete(
6 seg_length: scalar,
7 dev: scalar,
8 seed_assist: impl Into<Option<u32>>,
9 ) -> Option<Self> {
10 new(seg_length, dev, seed_assist)
11 }
12}
13
14pub fn new(
15 seg_length: scalar,
16 dev: scalar,
17 seed_assist: impl Into<Option<u32>>,
18) -> Option<PathEffect> {
19 PathEffect::from_ptr(unsafe {
20 sb::C_SkDiscretePathEffect_Make(segLength:seg_length, dev, seedAssist:seed_assist.into().unwrap_or(0))
21 })
22}
23