Enum stroke::bezier_segment::BezierSegment
source · pub enum BezierSegment<P: Point> {
Linear(LineSegment<P>),
Quadratic(QuadraticBezier<P>),
Cubic(CubicBezier<P>),
}
Variants§
Implementations§
source§impl<P> BezierSegment<P>where
P: Point,
impl<P> BezierSegment<P>where P: Point,
pub fn eval<F>(&self, t: P::Scalar) -> P
pub fn start(&self) -> P
pub fn end(&self) -> P
pub fn is_linear<F>(&self, tolerance: F) -> boolwhere F: Float + Into<P::Scalar>,
pub fn baseline(&self) -> LineSegment<P>
sourcepub fn split<F>(&self, t: F) -> (BezierSegment<P>, BezierSegment<P>)where
F: Float + Into<P::Scalar>,
pub fn split<F>(&self, t: F) -> (BezierSegment<P>, BezierSegment<P>)where F: Float + Into<P::Scalar>,
Split this segment into two sub-segments.
Trait Implementations§
source§impl<P: Clone + Point> Clone for BezierSegment<P>
impl<P: Clone + Point> Clone for BezierSegment<P>
source§fn clone(&self) -> BezierSegment<P>
fn clone(&self) -> BezierSegment<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<P> From<CubicBezier<P>> for BezierSegment<P>where
P: Point,
impl<P> From<CubicBezier<P>> for BezierSegment<P>where P: Point,
source§fn from(s: CubicBezier<P>) -> Self
fn from(s: CubicBezier<P>) -> Self
Converts to this type from the input type.
source§impl<P> From<LineSegment<P>> for BezierSegment<P>where
P: Point,
impl<P> From<LineSegment<P>> for BezierSegment<P>where P: Point,
source§fn from(s: LineSegment<P>) -> Self
fn from(s: LineSegment<P>) -> Self
Converts to this type from the input type.
source§impl<P> From<QuadraticBezier<P>> for BezierSegment<P>where
P: Point,
impl<P> From<QuadraticBezier<P>> for BezierSegment<P>where P: Point,
source§fn from(s: QuadraticBezier<P>) -> Self
fn from(s: QuadraticBezier<P>) -> Self
Converts to this type from the input type.
source§impl<P: PartialEq + Point> PartialEq<BezierSegment<P>> for BezierSegment<P>
impl<P: PartialEq + Point> PartialEq<BezierSegment<P>> for BezierSegment<P>
source§fn eq(&self, other: &BezierSegment<P>) -> bool
fn eq(&self, other: &BezierSegment<P>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<P: Copy + Point> Copy for BezierSegment<P>
impl<P: Point> StructuralPartialEq for BezierSegment<P>
Auto Trait Implementations§
impl<P> RefUnwindSafe for BezierSegment<P>where P: RefUnwindSafe,
impl<P> Send for BezierSegment<P>where P: Send,
impl<P> Sync for BezierSegment<P>where P: Sync,
impl<P> Unpin for BezierSegment<P>where P: Unpin,
impl<P> UnwindSafe for BezierSegment<P>where P: 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