Only emit a `ClosePath` command in a `PathBufferStream` if the subpath
is closed. Closes #60.
This commit is contained in:
parent
11913a20f1
commit
2c2afe2fc0
|
@ -181,8 +181,11 @@ impl<'a> Iterator for PathBufferStream<'a> {
|
|||
let subpath = &self.path_buffer.subpaths[self.subpath_index as usize];
|
||||
if self.endpoint_index == subpath.last_endpoint_index {
|
||||
self.subpath_index += 1;
|
||||
if subpath.closed {
|
||||
return Some(PathCommand::ClosePath)
|
||||
}
|
||||
return self.next()
|
||||
}
|
||||
|
||||
let endpoint_index = self.endpoint_index;
|
||||
self.endpoint_index += 1;
|
||||
|
|
Loading…
Reference in New Issue