Expand description
A single line.
Fields§
§p0: Vec2
§p1: Vec2
Implementations§
Trait Implementations§
source§impl ParamCurve for Line
impl ParamCurve for Line
source§fn subsegment(&self, range: Range<f64>) -> Line
fn subsegment(&self, range: Range<f64>) -> Line
Get a subsegment of the curve for the given parameter range.
source§fn subdivide(&self) -> (Self, Self)
fn subdivide(&self) -> (Self, Self)
Subdivide into (roughly) halves.
source§impl ParamCurveArclen for Line
impl ParamCurveArclen for Line
source§impl ParamCurveArea for Line
impl ParamCurveArea for Line
source§fn signed_area(&self) -> f64
fn signed_area(&self) -> f64
Compute the signed area under the curve. Read more
source§impl ParamCurveCurvature for Line
impl ParamCurveCurvature for Line
source§impl ParamCurveDeriv for Line
impl ParamCurveDeriv for Line
source§impl ParamCurveExtrema for Line
impl ParamCurveExtrema for Line
source§impl ParamCurveNearest for Line
impl ParamCurveNearest for Line
source§impl Shape for Line
impl Shape for Line
source§fn area(&self) -> f64
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.
§type BezPathIter = LinePathIter
type BezPathIter = LinePathIter
The iterator resulting from
to_bez_path
.source§fn to_bez_path(&self, _tolerance: f64) -> LinePathIter ⓘ
fn to_bez_path(&self, _tolerance: f64) -> LinePathIter ⓘ
Convert to a Bézier path, as an iterator over path elements. Read more
source§fn bounding_box(&self) -> Rect
fn bounding_box(&self) -> Rect
The smallest rectangle that encloses the shape.