Struct nannou::geom::line::Line [] [src]

pub struct Line<S = DefaultScalar> {
    pub start: Point2<S>,
    pub end: Point2<S>,
    pub half_thickness: S,
}

A line represented by two points.

Fields

The start point of the line.

The end point of the line.

Half of the thickness of the line.

Methods

impl<S> Line<S> where
    S: BaseFloat
[src]

[src]

Short-hand constructor for a Line.

[src]

The centre of the line.

[src]

The bounding Rect of the Line including thickness and line caps.

[src]

The four corners of the rectangle describing the line.

[src]

Produce an iterator yielding the four corners of the rectangle describing the line.

[src]

The two triangles that describe the line.

[src]

Given two points and half the line thickness, return the two triangles that describe the line.

[src]

Describes whether or not the given point touches the line.

If so, the Tri containing the point will be returned.

None is returned otherwise.

Trait Implementations

impl<S> From<Line<S>> for Line<S> where
    S: BaseFloat
[src]

[src]

Performs the conversion.

impl<S: Copy> Copy for Line<S>
[src]

impl<S: Clone> Clone for Line<S>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<S: Debug> Debug for Line<S>
[src]

[src]

Formats the value using the given formatter. Read more

impl<S: PartialEq> PartialEq for Line<S>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

Auto Trait Implementations

impl<S> Send for Line<S> where
    S: Send

impl<S> Sync for Line<S> where
    S: Sync