pub struct PolygonSlices<'s, V, R> { /* private fields */ }Expand description
Lazy iterator over the slices of a polygon in every tile it reaches; see
Slicer::polygon.
A lending iterator: a PolygonPiece borrows the iterator’s piece buffer, so it is valid
until the next call to next. Loop with while let Some(slice) = slices.next().
Implementations§
Source§impl<'s, V: PolyVertex, R: AsRef<[V]>> PolygonSlices<'s, V, R>
impl<'s, V: PolyVertex, R: AsRef<[V]>> PolygonSlices<'s, V, R>
Sourcepub fn next(&mut self) -> Option<Result<PolygonSlice<'_, V, R>, TileError>>
pub fn next(&mut self) -> Option<Result<PolygonSlice<'_, V, R>, TileError>>
The next slice, or None when the polygon is done. An error ends the iteration: only
TileError::GeometryTooLarge, for a piece of more than u32::MAX vertices, since
Slicer::polygon settled every overflow up front.
Sourcepub fn fill_ring(&self, run: &FillRun) -> [V; 5]
pub fn fill_ring(&self, run: &FillRun) -> [V; 5]
The ring Slicer::tile_polygon yields for run’s polygon in
each tile of the run: the tile’s buffered box grown by one unit, tile-local and closed (its
first vertex repeated), all synthetic vertices, wound like the polygon’s exterior. It is the
polygon’s only ring there. The same as Slicer::fill_ring, for use
while the iterator borrows the slicer.