pub struct Path64(/* private fields */);Expand description
Integer grid polyline / polygon ring (Path64), backed by Vec<Point64>.
整数坐标折线或闭合轮廓(Path64),内部为 Vec<Point64>。
§Geometry helpers / 几何辅组
Path64::new,Path64::from_vec— construct / 构造Path64::translate,Path64::scale— transform (integer deltas / float scale) / 平移与缩放Path64::iter,Path64::len,Path64::get_point— access / 访问
Clipper-related methods (simplify, area, …) are on the same Path64 type in clipper64/mod.rs
(re-exported at the crate root).
与 Clipper 相关的方法(simplify、area 等)在同一 Path64 上于 clipper64/mod.rs 中实现(并在 crate 根再导出)。
Implementations§
Source§impl Path64
impl Path64
Sourcepub fn new(points: impl Into<Vec<Point64>>) -> Self
pub fn new(points: impl Into<Vec<Point64>>) -> Self
From anything that becomes Vec (e.g. vec![…]). / 由 Into<Vec> 构造。
pub fn as_slice(&self) -> &[Point64] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [Point64] ⓘ
pub fn iter(&self) -> Iter<'_, Point64>
pub fn iter_mut(&mut self) -> IterMut<'_, Point64>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn add_point(&mut self, point: Point64)
Source§impl Path64
impl Path64
Sourcepub fn simplify(&self, epsilon: f64, is_open_path: bool) -> LazyPaths64
pub fn simplify(&self, epsilon: f64, is_open_path: bool) -> LazyPaths64
Simplifies the path (RDP-style via Clipper). is_open_path marks open polylines.
简化路径(Clipper 实现)。is_open_path 表示开放折线。
Sourcepub fn point_in_polygon(&self, point: Point64) -> PointInPolygonResult
pub fn point_in_polygon(&self, point: Point64) -> PointInPolygonResult
Tests where point lies relative to this path. / 判断 point 与路径的位置关系。
Sourcepub fn to_pathd(&self) -> LazyPathsD
pub fn to_pathd(&self) -> LazyPathsD
Converts to double paths (LazyPathsD) for ClipperD workflows.
转为双精度路径,便于走 ClipperD 流程。
Source§impl Path64
impl Path64
Sourcepub fn minkowski_sum(&self, pattern: &Path64, is_closed: bool) -> LazyPaths64
pub fn minkowski_sum(&self, pattern: &Path64, is_closed: bool) -> LazyPaths64
Minkowski sum with pattern; is_closed toggles closed semantics.
与 pattern 的闵可夫斯基和。
Sourcepub fn minkowski_diff(&self, pattern: &Path64, is_closed: bool) -> LazyPaths64
pub fn minkowski_diff(&self, pattern: &Path64, is_closed: bool) -> LazyPaths64
Minkowski difference. / 闵可夫斯基差。
Trait Implementations§
Source§impl FromIterator<Path64> for Paths64
impl FromIterator<Path64> for Paths64
Source§fn from_iter<T: IntoIterator<Item = Path64>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Path64>>(iter: T) -> Self
Collect iterator of paths. / 从迭代器收集。