Trait zng_layout::unit::LineFromTuplesBuilder

source ·
pub trait LineFromTuplesBuilder {
    // Required method
    fn to<X2: Into<Length>, Y2: Into<Length>>(self, x2: X2, y2: Y2) -> Line;
}
Expand description

Build a Line using the syntax (x1, y1).to(x2, y2).

§Examples

let line = (10, 20).to(100, 120);
assert_eq!(Line::new(Point::new(10, 20), Point::new(100, 120)), line);

Required Methods§

source

fn to<X2: Into<Length>, Y2: Into<Length>>(self, x2: X2, y2: Y2) -> Line

New Line from self as a start point to x2, y2 end point.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<X1: Into<Length>, Y1: Into<Length>> LineFromTuplesBuilder for (X1, Y1)

source§

fn to<X2: Into<Length>, Y2: Into<Length>>(self, x2: X2, y2: Y2) -> Line

Implementors§