pub struct ConvCurve<VS: VertexSource> { /* private fields */ }Expand description
Curve flattening converter.
Wraps a VertexSource and replaces curve3/curve4 commands with
sequences of line_to vertices computed by the Curve3/Curve4 classes.
Port of C++ conv_curve<VertexSource>.
Implementations§
Source§impl<VS: VertexSource> ConvCurve<VS>
impl<VS: VertexSource> ConvCurve<VS>
pub fn new(source: VS) -> Self
pub fn source(&self) -> &VS
pub fn source_mut(&mut self) -> &mut VS
Sourcepub fn set_approximation_scale(&mut self, s: f64)
pub fn set_approximation_scale(&mut self, s: f64)
Set the approximation scale for both curve types.
pub fn approximation_scale(&self) -> f64
Sourcepub fn set_angle_tolerance(&mut self, v: f64)
pub fn set_angle_tolerance(&mut self, v: f64)
Set the angle tolerance for both curve types.
pub fn angle_tolerance(&self) -> f64
Sourcepub fn set_cusp_limit(&mut self, v: f64)
pub fn set_cusp_limit(&mut self, v: f64)
Set the cusp limit (curve4 only — curve3 does not support cusp limit).
pub fn cusp_limit(&self) -> f64
Trait Implementations§
Source§impl<VS: VertexSource> VertexSource for ConvCurve<VS>
impl<VS: VertexSource> VertexSource for ConvCurve<VS>
Auto Trait Implementations§
impl<VS> Freeze for ConvCurve<VS>where
VS: Freeze,
impl<VS> RefUnwindSafe for ConvCurve<VS>where
VS: RefUnwindSafe,
impl<VS> Send for ConvCurve<VS>where
VS: Send,
impl<VS> Sync for ConvCurve<VS>where
VS: Sync,
impl<VS> Unpin for ConvCurve<VS>where
VS: Unpin,
impl<VS> UnwindSafe for ConvCurve<VS>where
VS: UnwindSafe,
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