Module pix_engine::shape::line
source · Expand description
A shape type representing lines used for drawing.
Examples
You can create a Line using Line::new
:
use pix_engine::prelude::*;
// 2D
let line = Line::new([10, 20], [30, 10]);
let p1 = point![10, 20];
let p2 = point![30, 10];
let line = Line::new(p1, p2);
// 3D
let line = Line::new([10, 20, 5], [30, 10, 5]);
Structs
- A
Line
with start and end Points.