[][src]Struct nannou::draw::primitive::line::Line

pub struct Line<S = Default> {
    pub path: PathStroke<S>,
    pub start: Option<Point2<S>>,
    pub end: Option<Point2<S>>,
}

A path containing only two points - a start and end.

The usage of this type is almost identical to PathStroke but provides start, end and points(a, b) methods.

Fields

path: PathStroke<S>start: Option<Point2<S>>end: Option<Point2<S>>

Implementations

impl<S> Line<S>[src]

pub fn weight(self, weight: f32) -> Self[src]

Short-hand for the stroke_weight method.

pub fn tolerance(self, tolerance: f32) -> Self[src]

Short-hand for the stroke_tolerance method.

pub fn start(self, start: Point2<S>) -> Self[src]

Specify the start point of the line.

pub fn end(self, end: Point2<S>) -> Self[src]

Specify the end point of the line.

pub fn points(self, start: Point2<S>, end: Point2<S>) -> Self[src]

Specify the start and end points of the line.

Trait Implementations

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

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

impl<S> Default for Line<S> where
    S: Zero
[src]

impl<S> From<Line<S>> for Primitive<S>[src]

impl RenderPrimitive for Line<f32>[src]

impl<S> SetColor<f32> for Line<S>[src]

impl<S> SetOrientation<S> for Line<S>[src]

impl<S> SetPosition<S> for Line<S>[src]

impl<S> SetStroke for Line<S>[src]

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,