Trait lyon::path_iterator::PathIterator
[−]
[src]
pub trait PathIterator: Iterator<Item=PathEvent> { fn get_state(&self) -> &PathState; fn flattened(self, tolerance: f32) -> FlatteningIter<Self> { ... } fn svg_iter(self) -> Map<Self, fn(PathEvent) -> SvgEvent> { ... } }
An extension to the common Iterator interface, that adds information which is useful when chaining path-specific iterators.
Required Methods
fn get_state(&self) -> &PathState
The returned structure exposes the current position, the first position in the current sub-path, and the position of the last control point.
Provided Methods
fn flattened(self, tolerance: f32) -> FlatteningIter<Self>
Returns an iterator that turns curves into line segments.
fn svg_iter(self) -> Map<Self, fn(PathEvent) -> SvgEvent>
Returns an iterator of SVG events.
Implementors
impl<SvgIter> PathIterator for SvgToPathIter<SvgIter> where SvgIter: SvgIterator
impl<Iter> PathIterator for PathStateIter<Iter> where Iter: Iterator<Item=PathEvent>