pub struct PathsD(/* private fields */);Expand description
Collection of double-precision paths.
双精度路径集合。
Implementations§
Source§impl PathsD
impl PathsD
pub fn new(paths: impl Into<Vec<PathD>>) -> Self
pub fn as_slice(&self) -> &[PathD]
pub fn path(&self, index: usize) -> &PathD
pub fn len(&self) -> usize
pub fn add_path(&mut self, path: PathD)
pub fn add_paths(&mut self, paths: impl IntoIterator<Item = PathD>)
pub fn to_vec(&self) -> Vec<PathD>
pub fn scale(&self, sx: f64, sy: f64) -> Self
Source§impl PathsD
impl PathsD
Sourcepub fn simplify(&self, epsilon: f64, is_open_path: bool) -> LazyPathsD
pub fn simplify(&self, epsilon: f64, is_open_path: bool) -> LazyPathsD
Simplifies all paths. / 简化所有路径。
Sourcepub fn inflate(
&self,
delta: f64,
join_type: JoinType,
end_type: EndType,
miter_limit: f64,
precision: i32,
) -> LazyPathsD
pub fn inflate( &self, delta: f64, join_type: JoinType, end_type: EndType, miter_limit: f64, precision: i32, ) -> LazyPathsD
Offsets all paths; precision is ClipperD decimal precision.
偏移所有路径;precision 为 ClipperD 小数精度。
Sourcepub fn to_paths64(&self) -> LazyPaths64
pub fn to_paths64(&self) -> LazyPaths64
Converts to integer paths. / 转为整数路径集合。
Source§impl PathsD
impl PathsD
Sourcepub fn minkowski_sum(
&self,
pattern: &PathD,
is_closed: bool,
precision: i32,
fillrule: ClipperFillRule,
) -> LazyPathsD
pub fn minkowski_sum( &self, pattern: &PathD, is_closed: bool, precision: i32, fillrule: ClipperFillRule, ) -> LazyPathsD
Minkowski sum with fill rule. / 闵可夫斯基和(填充规则)。
Sourcepub fn minkowski_diff(
&self,
pattern: &PathD,
is_closed: bool,
precision: i32,
fillrule: ClipperFillRule,
) -> LazyPathsD
pub fn minkowski_diff( &self, pattern: &PathD, is_closed: bool, precision: i32, fillrule: ClipperFillRule, ) -> LazyPathsD
Minkowski difference with fill rule. / 闵可夫斯基差(填充规则)。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PathsD
impl RefUnwindSafe for PathsD
impl Send for PathsD
impl Sync for PathsD
impl Unpin for PathsD
impl UnsafeUnpin for PathsD
impl UnwindSafe for PathsD
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