[−]Struct piet_common::kurbo::Line
A single line.
Fields
p0: Pointp1: PointMethods
impl Line
Trait Implementations
impl ParamCurveExtrema for Line
fn extrema(&self) -> ArrayVec<[f64; 4]>
fn extrema_ranges(&self) -> ArrayVec<[Range<f64>; 5]>
Return parameter ranges, each of which is monotonic within the range.
fn bounding_box(&self) -> Rect
The smallest rectangle that encloses the curve in the range (0..1).
impl ParamCurveCurvature for Line
impl ParamCurveDeriv for Line
type DerivResult = ConstPoint
fn deriv(&self) -> ConstPoint
fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64
Estimate arclength using Gaussian quadrature. Read more
impl ParamCurve for Line
fn eval(&self, t: f64) -> Point
fn start(&self) -> Point
fn end(&self) -> Point
fn subsegment(&self, range: Range<f64>) -> Line
fn subdivide(&self) -> (Self, Self)
Subdivide into (roughly) halves.
impl Copy for Line
impl Mul<Line> for Affine
type Output = Line
The resulting type after applying the * operator.
fn mul(self, other: Line) -> Line
impl Mul<Line> for TranslateScale
type Output = Line
The resulting type after applying the * operator.
fn mul(self, other: Line) -> Line
impl ParamCurveArea for Line
fn signed_area(&self) -> f64
impl Debug for Line
impl ParamCurveArclen for Line
fn arclen(&self, _accuracy: f64) -> f64
fn inv_arclen(&self, arclen: f64, accuracy: f64) -> f64
Solve for the parameter that has the given arclength from the start. Read more
impl Shape for Line
type BezPathIter = LinePathIter
The iterator resulting from to_bez_path.
fn to_bez_path(&self, _tolerance: f64) -> LinePathIter
fn area(&self) -> f64
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
fn winding(&self, _pt: Point) -> i32
Same consideration as area.
fn bounding_box(&self) -> Rect
fn as_line(&self) -> Option<Line>
fn into_bez_path(self, tolerance: f64) -> BezPath
Convert into a Bézier path. Read more
fn as_rect(&self) -> Option<Rect>
If the shape is a rectangle, make it available.
fn as_rounded_rect(&self) -> Option<RoundedRect>
If the shape is a rounded rectangle, make it available.
fn as_circle(&self) -> Option<Circle>
If the shape is a circle, make it available.
fn as_path_slice(&self) -> Option<&[PathEl]>
If the shape is stored as a slice of path elements, make that available. Read more
impl Clone for Line
fn clone(&self) -> Line
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl ParamCurveNearest for Line
Auto Trait Implementations
impl Sync for Line
impl Send for Line
impl Unpin for Line
impl RefUnwindSafe for Line
impl UnwindSafe for Line
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,
impl<T> RoundFrom<T> for T[src]
fn round_from(x: T) -> T[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>, [src]
U: RoundFrom<T>,