skia_safe/modules/svg/shape/
path.rs

1use crate::{
2    impl_default_make,
3    prelude::*,
4    svg::{DebugAttributes, NodeSubtype},
5};
6use skia_bindings as sb;
7
8pub type Path = RCHandle<sb::SkSVGPath>;
9
10impl NodeSubtype for sb::SkSVGPath {
11    type Base = sb::SkSVGShape;
12}
13
14impl_default_make!(Path, sb::C_SkSVGPath_Make);
15
16impl DebugAttributes for Path {
17    const NAME: &'static str = "Path";
18
19    fn _dbg(&self, builder: &mut std::fmt::DebugStruct) {
20        self.as_base()._dbg(builder.field("path", &self.path()));
21    }
22}
23
24impl Path {
25    skia_svg_macros::attrs! {
26        SkSVGPath => {
27            path: crate::Path [get(value) => crate::Path::from_native_ref(value), set(value) => value.into_native()]
28        }
29    }
30}