[][src]Struct svgbob::fragment::Line

pub struct Line {
    pub start: Point,
    pub end: Point,
    pub is_broken: bool,
}

Fields

start: Pointend: Pointis_broken: bool

Methods

impl Line[src]

pub fn extend(&self, length: f32) -> Self[src]

extend the line by a length added to the end point https://stackoverflow.com/questions/7740507/extend-a-line-segment-a-specific-distance#7741655

pub fn extend_start(&self, length: f32) -> Self[src]

extend but on the oposite direction TODO: This implementation is hacky

Trait Implementations

impl Bounds for Line[src]

impl Clone for Line[src]

impl Debug for Line[src]

impl Display for Line[src]

impl Eq for Line[src]

impl From<Line> for Fragment[src]

impl<MSG> Into<Node<&'static str, &'static str, (), MSG>> for Line[src]

impl Ord for Line[src]

This is needed since this struct contains f32 which rust doesn't provide Eq implementation

impl PartialEq<Line> for Line[src]

impl PartialOrd<Line> for Line[src]

Auto Trait Implementations

impl RefUnwindSafe for Line

impl Send for Line

impl Sync for Line

impl Unpin for Line

impl UnwindSafe for Line

Blanket Implementations

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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.