Skip to content

Commit

Permalink
Make Contour::is_closed public
Browse files Browse the repository at this point in the history
  • Loading branch information
madig committed Jan 7, 2022
1 parent 0b33921 commit ec81873
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/glyph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ pub struct Contour {
}

impl Contour {
fn is_closed(&self) -> bool {
/// Whether the contour is closed.
pub fn is_closed(&self) -> bool {
self.points.first().map_or(true, |v| v.typ != PointType::Move)
}

Expand Down

0 comments on commit ec81873

Please sign in to comment.