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§
source§impl 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<P>(
&self,
close: bool,
offset: P,
precision: Option<u32>
) -> (String, P)
pub fn to_svg_string<P>( &self, close: bool, offset: P, precision: Option<u32> ) -> (String, P)
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§
source§impl Clone for CompoundPath
impl Clone for CompoundPath
source§fn clone(&self) -> CompoundPath
fn clone(&self) -> CompoundPath
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompoundPath
impl Debug for CompoundPath
Auto Trait Implementations§
impl Freeze for CompoundPath
impl RefUnwindSafe for CompoundPath
impl Send for CompoundPath
impl Sync for CompoundPath
impl Unpin for CompoundPath
impl UnwindSafe for CompoundPath
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more