pub struct Contour {
pub segments: Vec<PathSegment>,
}Expand description
A path made of consecutive segments.
Fields§
§segments: Vec<PathSegment>Implementations§
Source§impl Contour
impl Contour
Sourcepub fn new(segments: Vec<PathSegment>) -> Self
pub fn new(segments: Vec<PathSegment>) -> Self
The contour through the given segments, in order.
Sourcepub fn polyline(vertices: &[C64], closed: bool) -> Self
pub fn polyline(vertices: &[C64], closed: bool) -> Self
The polyline through vertices (closed back to the first vertex when closed).
Sourcepub fn rectangle(lower_left: C64, upper_right: C64) -> Self
pub fn rectangle(lower_left: C64, upper_right: C64) -> Self
The axis-aligned rectangle with opposite corners lower_left and upper_right, traversed
counter-clockwise.
Sourcepub fn is_connected(&self, tol: f64) -> bool
pub fn is_connected(&self, tol: f64) -> bool
Whether each segment starts where the previous one ends (within tol).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Contour
impl !Send for Contour
impl !Sync for Contour
impl !UnwindSafe for Contour
impl Freeze for Contour
impl Unpin for Contour
impl UnsafeUnpin for Contour
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