Add a new `Outline::len()` method

This commit is contained in:
Sebastian K 2020-06-24 17:47:30 -07:00 committed by Patrick Walton
parent e5eee41b48
commit 9d86f663ed
1 changed files with 6 additions and 0 deletions

View File

@ -238,6 +238,12 @@ impl Outline {
self.contours.iter().all(Contour::is_empty) self.contours.iter().all(Contour::is_empty)
} }
/// Returns the number of contours in this outline.
#[inline]
pub fn len(&self) -> usize {
self.contours.len()
}
/// Appends the contours in another outline to this one. /// Appends the contours in another outline to this one.
pub fn push_outline(&mut self, other: Outline) { pub fn push_outline(&mut self, other: Outline) {
if other.is_empty() { if other.is_empty() {