pub struct SmoothFrame { /* private fields */ }Expand description
闭合凸 polygon / frame。
Implementations§
Source§impl SmoothFrame
impl SmoothFrame
Sourcepub fn closed(points: impl IntoIterator<Item = Point>) -> Self
pub fn closed(points: impl IntoIterator<Item = Point>) -> Self
创建闭合 frame。
当前版本要求输入点组成非退化凸多边形。
Sourcepub fn with_radius(self, radius: f64) -> Self
pub fn with_radius(self, radius: f64) -> Self
设置每个角的核心圆半径。
Sourcepub fn with_smoothing(self, smoothing: f64) -> Self
pub fn with_smoothing(self, smoothing: f64) -> Self
设置每个角的 Sketch-like smoothing,生成前会 clamp 到 [0, 1]。
Sourcepub fn to_path(&self) -> Result<SmoothPath, SmoothError>
pub fn to_path(&self) -> Result<SmoothPath, SmoothError>
生成闭合 smooth frame 路径。
Trait Implementations§
Source§impl Clone for SmoothFrame
impl Clone for SmoothFrame
Source§fn clone(&self) -> SmoothFrame
fn clone(&self) -> SmoothFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SmoothFrame
impl Debug for SmoothFrame
Source§impl PartialEq for SmoothFrame
impl PartialEq for SmoothFrame
Source§fn eq(&self, other: &SmoothFrame) -> bool
fn eq(&self, other: &SmoothFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SmoothFrame
Auto Trait Implementations§
impl Freeze for SmoothFrame
impl RefUnwindSafe for SmoothFrame
impl Send for SmoothFrame
impl Sync for SmoothFrame
impl Unpin for SmoothFrame
impl UnsafeUnpin for SmoothFrame
impl UnwindSafe for SmoothFrame
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