add Contour::clear
This commit is contained in:
parent
ed2807eb84
commit
cb91f40d7a
|
@ -281,6 +281,15 @@ impl Contour {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// restore self to the state of Contour::new(), but keep the points buffer allocated
|
||||||
|
#[inline]
|
||||||
|
pub fn clear(&mut self) {
|
||||||
|
self.points.clear();
|
||||||
|
self.flags.clear();
|
||||||
|
self.bounds = RectF::default();
|
||||||
|
self.closed = false;
|
||||||
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn iter(&self, flags: ContourIterFlags) -> ContourIter {
|
pub fn iter(&self, flags: ContourIterFlags) -> ContourIter {
|
||||||
ContourIter {
|
ContourIter {
|
||||||
|
|
Loading…
Reference in New Issue