Struct visioncortex::CompoundPath
source · [−]pub struct CompoundPath {
pub paths: Vec<CompoundPathElement>,
}Expand description
A collection of Path and Spline that represents a shape with holes
Fields
paths: Vec<CompoundPathElement>Implementations
sourceimpl CompoundPath
impl CompoundPath
pub fn new() -> Self
pub fn iter(&self) -> Iter<'_, CompoundPathElement>
pub fn iter_mut(&mut self) -> IterMut<'_, CompoundPathElement>
pub fn append(&mut self, other: Self)
pub fn add_path_i32(&mut self, path: PathI32)
pub fn add_path_f64(&mut self, path: PathF64)
pub fn add_spline(&mut self, path: Spline)
sourcepub fn to_svg_string(
&self,
close: bool,
offset: PointF64,
precision: Option<u32>
) -> (String, PointF64)
pub fn to_svg_string(
&self,
close: bool,
offset: PointF64,
precision: Option<u32>
) -> (String, PointF64)
returns a single svg path string in relative path syntax and offset
pub fn reduce(&self, tolerance: f64) -> Self
pub fn remove_holes(&mut self)
pub fn is_empty(&self) -> bool
pub fn smooth(
&self,
corner_threshold: f64,
outset_ratio: f64,
segment_length: f64
) -> Self
Trait Implementations
sourceimpl Debug for CompoundPath
impl Debug for CompoundPath
Auto Trait Implementations
impl RefUnwindSafe for CompoundPath
impl Send for CompoundPath
impl Sync for CompoundPath
impl Unpin for CompoundPath
impl UnwindSafe for CompoundPath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more