Struct geom::line::Line [−][src]
Expand description
A line segment.
Tuple Fields
0: Pt2D
1: Pt2D
Implementations
Creates a line segment between two points. None if the points are the same.
Equivalent to Line::new(pt1, pt2).unwrap()
. Use this to effectively document an assertion
at the call-site.
Returns an infinite line passing through this line’s two points.
Returns the two points in this line segment.
Returns a polyline containing these two points.
Returns a thick line segment.
If two line segments intersect – including endpoints – return the point where they hit. Undefined if the two lines have more than one intersection point!
Determine if two line segments intersect, but more so than just two endpoints touching.
If the line segment intersects with an infinite line – including endpoints – return the point where they hit. Undefined if the segment and infinite line intersect at more than one point!
Perpendicularly shifts the line over to the right. Width must be non-negative.
Perpendicularly shifts the line over to the left. Width must be non-negative.
Perpendicularly shifts the line to the right if positive or left if negative.
Returns a point along the line segment, unless the distance exceeds the segment’s length.
Equivalent to self.dist_along(dist).unwrap()
. Use this to document an assertion at the
call-site.
Returns a subset of this line, with two percentages along the line’s length.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Line
impl UnwindSafe for Line
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self