Crate graphics_shapes
source ·Expand description
Shapes for Graphics
Provides shapes for simple graphics
let rect = Rect::new((10,10),(20,20));
assert!(rect.contains(coord!(15,15)));
let triangle = Triangle::new((34,5),(12,30),(9,10));
let rotated = triangle.rotate(45);
let start = coord!(20,130);
let dist = start.distance((30,130));
Modules
Macros
- Create a list of Coords