[−][src]Struct kurbo::Line
A single line.
Fields
p0: Point
p1: Point
Methods
impl Line
[src]
Trait Implementations
impl ParamCurve for Line
[src]
fn eval(&self, t: f64) -> Point
[src]
fn start(&self) -> Point
[src]
fn end(&self) -> Point
[src]
fn subsegment(&self, range: Range<f64>) -> Line
[src]
fn subdivide(&self) -> (Self, Self)
[src]
impl ParamCurveDeriv for Line
[src]
type DerivResult = ConstPoint
fn deriv(&self) -> ConstPoint
[src]
fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64
[src]
impl ParamCurveArclen for Line
[src]
fn arclen(&self, _accuracy: f64) -> f64
[src]
fn inv_arclen(&self, arclen: f64, accuracy: f64) -> f64
[src]
impl ParamCurveArea for Line
[src]
fn signed_area(&self) -> f64
[src]
impl ParamCurveNearest for Line
[src]
impl ParamCurveCurvature for Line
[src]
impl ParamCurveExtrema for Line
[src]
fn extrema(&self) -> ArrayVec<[f64; 4]>
[src]
fn extrema_ranges(&self) -> ArrayVec<[Range<f64>; 5]>
[src]
fn bounding_box(&self) -> Rect
[src]
impl Shape for Line
[src]
type BezPathIter = LinePathIter
The iterator resulting from to_bez_path
.
fn to_bez_path(&self, _tolerance: f64) -> LinePathIter
[src]
fn area(&self) -> f64
[src]
Returning zero here is consistent with the contract (area is only meaningful for closed shapes), but an argument can be made that the contract should be tightened to include the Green's theorem contribution.
fn perimeter(&self, _accuracy: f64) -> f64
[src]
fn winding(&self, _pt: Point) -> i32
[src]
Same consideration as area
.
fn bounding_box(&self) -> Rect
[src]
fn as_line(&self) -> Option<Line>
[src]
fn into_bez_path(self, tolerance: f64) -> BezPath
[src]
fn as_rect(&self) -> Option<Rect>
[src]
fn as_rounded_rect(&self) -> Option<RoundedRect>
[src]
fn as_circle(&self) -> Option<Circle>
[src]
fn as_path_slice(&self) -> Option<&[PathEl]>
[src]
impl From<Line> for PathSeg
[src]
impl Clone for Line
[src]
impl Copy for Line
[src]
impl PartialEq<Line> for Line
[src]
impl Debug for Line
[src]
impl Mul<Line> for Affine
[src]
type Output = Line
The resulting type after applying the *
operator.
fn mul(self, other: Line) -> Line
[src]
impl Mul<Line> for TranslateScale
[src]
Auto Trait Implementations
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
impl RefUnwindSafe for Line
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,