[−]Struct druid::piet::kurbo::Line
A single line.
Fields
p0: Point
The line's start point.
p1: Point
The line's end point.
Implementations
impl Line
Trait Implementations
impl Clone for Line
fn clone(&self) -> Line
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Line
impl Data for Line
[src]
impl Debug for Line
impl From<Line> for PathSeg
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 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)
impl ParamCurveArclen for Line
impl ParamCurveArea for Line
fn signed_area(&self) -> f64
impl ParamCurveCurvature for Line
impl ParamCurveDeriv for Line
type DerivResult = ConstPoint
The parametric curve obtained by taking the derivative of this one.
fn deriv(&self) -> ConstPoint
fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64
impl ParamCurveExtrema for Line
fn extrema(&self) -> ArrayVec<[f64; 4]>
fn extrema_ranges(&self) -> ArrayVec<[Range<f64>; 5]>
fn bounding_box(&self) -> Rect
impl ParamCurveNearest for Line
impl PartialEq<Line> for Line
impl Scalable for Line
[src]
fn to_px(&self, scale: &Scale) -> Line
[src]
Converts a Line
from display points into pixels,
using the x axis scale factor for x
and the y axis scale factor for y
.
fn to_dp(&self, scale: &Scale) -> Line
[src]
Converts a Line
from pixels into display points,
using the x axis scale factor for x
and the y axis scale factor for y
.
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
fn as_rect(&self) -> Option<Rect>
fn as_rounded_rect(&self) -> Option<RoundedRect>
fn as_circle(&self) -> Option<Circle>
fn as_path_slice(&self) -> Option<&[PathEl]>
impl StructuralPartialEq for Line
Auto Trait Implementations
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AnyEq for T where
T: PartialEq<T> + Any,
[src]
T: PartialEq<T> + Any,
fn equals(&self, other: &(dyn Any + 'static)) -> bool
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
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>,