| 1 | //! Core primitives. |
|---|---|
| 2 | |
| 3 | pub mod rectangle; |
| 4 | |
| 5 | use crate::geometry::Point; |
| 6 | pub use rectangle::Rectangle; |
| 7 | |
| 8 | /// Create an iterator over all points in the primitive. |
| 9 | pub trait PointsIter { |
| 10 | /// Iterator over all points inside the primitive. |
| 11 | type Iter: Iterator<Item = Point>; |
| 12 | |
| 13 | /// Returns an iterator over all points inside the primitive. |
| 14 | fn points(&self) -> Self::Iter; |
| 15 | } |
| 16 |
