Struct rasterize::Line [−][src]
Line segment curve
Implementations
impl Line
[src]
impl Line
[src]pub fn new(p0: impl Into<Point>, p1: impl Into<Point>) -> Self
[src]
pub fn length(&self) -> Scalar
[src]
Length of the line
pub fn points(&self) -> [Point; 2]
[src]
Start and end points of the line
pub fn ends(&self) -> (Line, Line)
[src]
pub fn intersect(&self, other: Line) -> Option<(Scalar, Scalar)>
[src]
Find intersection of two lines
Returns pair of t
parameters for this line and the other line.
Found by solving self.at(t0) == other.at(t1)
. Actual intersection of
line segments can be found by making sure that 0.0 <= t0 <= 1.0 && 0.0 <= t1 <= 1.0
pub fn intersect_point(&self, other: Line) -> Option<Point>
[src]
Find intersection point between two line segments
pub fn direction(&self) -> Point
[src]
Direction vector associated with the line segment
Trait Implementations
impl Curve for Line
[src]
impl Curve for Line
[src]fn flatness(&self) -> Scalar
[src]
fn transform(&self, tr: Transform) -> Self
[src]
fn start(&self) -> Point
[src]
fn end(&self) -> Point
[src]
fn at(&self, t: Scalar) -> Point
[src]
fn deriv(&self) -> Segment
[src]
fn split_at(&self, t: Scalar) -> (Self, Self)
[src]
fn cut(&self, a: Scalar, b: Scalar) -> Self
[src]
fn bbox(&self, init: Option<BBox>) -> BBox
[src]
fn offset(&self, dist: Scalar, out: &mut impl Extend<Segment>)
[src]
fn reverse(&self) -> Self
[src]
fn roots(&self) -> CurveRoots
[src]
fn extremities(&self) -> CurveExtremities
[src]
fn length(&self, t0: Scalar, t1: Scalar) -> Scalar
[src]
fn flatten(&self, tr: Transform, flatness: Scalar) -> CurveFlattenIterⓘNotable traits for CurveFlattenIter
impl Iterator for CurveFlattenIter type Item = Line;
[src]
Notable traits for CurveFlattenIter
impl Iterator for CurveFlattenIter type Item = Line;
fn split(&self) -> (Self, Self)
[src]
fn from_length(&self, l: Scalar, error: Option<Scalar>) -> Scalar
[src]
impl StructuralPartialEq for Line
[src]
impl StructuralPartialEq for Line
[src]Auto Trait Implementations
impl RefUnwindSafe for Line
impl RefUnwindSafe for Line
impl UnwindSafe for Line
impl UnwindSafe for Line