pub enum PathSegment {
Line {
from: C64,
to: C64,
},
Arc {
centre: C64,
radius: f64,
start_angle: f64,
end_angle: f64,
},
Curve {
z: Rc<dyn Fn(f64) -> C64>,
dz: Rc<dyn Fn(f64) -> C64>,
t0: f64,
t1: f64,
},
}Expand description
One smooth piece of a contour.
Variants§
Line
The straight segment from from to to.
Arc
The circular arc centre + radius·e^{iθ} for θ from start_angle to end_angle
(radians; counter-clockwise when end_angle > start_angle).
Curve
A parametrised curve z(t) for t in [t0, t1] with derivative dz(t).
Implementations§
Source§impl PathSegment
impl PathSegment
Sourcepub fn circle(centre: C64, radius: f64) -> Self
pub fn circle(centre: C64, radius: f64) -> Self
The full counter-clockwise circle, starting and ending at angle 0.
Sourcepub fn arc(centre: C64, radius: f64, start_angle: f64, end_angle: f64) -> Self
pub fn arc(centre: C64, radius: f64, start_angle: f64, end_angle: f64) -> Self
The circular arc centre + radius·e^{iθ}, θ from start_angle to end_angle (radians).
Trait Implementations§
Source§impl Clone for PathSegment
impl Clone for PathSegment
Auto Trait Implementations§
impl !RefUnwindSafe for PathSegment
impl !Send for PathSegment
impl !Sync for PathSegment
impl !UnwindSafe for PathSegment
impl Freeze for PathSegment
impl Unpin for PathSegment
impl UnsafeUnpin for PathSegment
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