1use crate::{scalar, Path, PathEffect};
2
3impl PathEffect {
4 pub fn path_1d(
5 path: &Path,
6 advance: scalar,
7 phase: scalar,
8 style: path_1d_path_effect::Style,
9 ) -> Option<PathEffect> {
10 path_1d_path_effect::new(path, advance, phase, style)
11 }
12}
13
14pub mod path_1d_path_effect {
15 use crate::{prelude::*, scalar, Path, PathEffect};
16 use skia_bindings::C_SkPath1DPathEffect_Make;
17
18 pub use skia_bindings::SkPath1DPathEffect_Style as Style;
19 variant_name!(Style::Translate);
20
21 pub fn new(path: &Path, advance: scalar, phase: scalar, style: Style) -> Option<PathEffect> {
22 PathEffect::from_ptr(unsafe {
23 C_SkPath1DPathEffect_Make(path:path.native(), advance, phase, style)
24 })
25 }
26}
27