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,7 +181,10 @@ impl<'a> Iterator for PathBufferStream<'a> {
|
||||||
let subpath = &self.path_buffer.subpaths[self.subpath_index as usize];
|
let subpath = &self.path_buffer.subpaths[self.subpath_index as usize];
|
||||||
if self.endpoint_index == subpath.last_endpoint_index {
|
if self.endpoint_index == subpath.last_endpoint_index {
|
||||||
self.subpath_index += 1;
|
self.subpath_index += 1;
|
||||||
return Some(PathCommand::ClosePath)
|
if subpath.closed {
|
||||||
|
return Some(PathCommand::ClosePath)
|
||||||
|
}
|
||||||
|
return self.next()
|
||||||
}
|
}
|
||||||
|
|
||||||
let endpoint_index = self.endpoint_index;
|
let endpoint_index = self.endpoint_index;
|
||||||
|
|
Loading…
Reference in New Issue