[−][src]Struct kurbo::Line
A single line.
Fields
p0: Vec2
p1: Vec2
Methods
impl Line
[src]
Trait Implementations
impl ParamCurve for Line
[src]
fn eval(&self, t: f64) -> Vec2
[src]
fn start(&self) -> Vec2
[src]
fn end(&self) -> Vec2
[src]
fn subsegment(&self, range: Range<f64>) -> Line
[src]
fn subdivide(&self) -> (Self, Self)
[src]
Subdivide into (roughly) halves.
impl ParamCurveDeriv for Line
[src]
type DerivResult = ConstVec2
fn deriv(&self) -> ConstVec2
[src]
fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64
[src]
Estimate arclength using Gaussian quadrature. Read more
impl ParamCurveArclen for Line
[src]
fn arclen(&self, _accuracy: f64) -> f64
[src]
fn inv_arclen(&self, arclen: f64, accuracy: f64) -> f64
[src]
Solve for the parameter that has the given arclength from the start. Read more
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]
Return parameter ranges, each of which is monotonic within the range.
fn bounding_box(&self) -> Rect
[src]
The smallest rectangle that encloses the curve in the range (0..1).
impl Shape for Line
[src]
type BezPathIter = LinePathIter
The iterator resulting from to_bez_path
.
ⓘImportant traits for LinePathIterfn 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: Vec2) -> 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]
If the shape is a rectangle, make it available.
fn as_circle(&self) -> Option<Circle>
[src]
If the shape is a circle, make it available.
fn as_path_slice(&self) -> Option<&[PathEl]>
[src]
If the shape is stored as a slice of path elements, make that available. Read more
impl Copy for Line
[src]
impl Clone for Line
[src]
fn clone(&self) -> Line
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Line
[src]
impl Mul<Line> for Affine
[src]
Auto Trait Implementations
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,