From 66ee901e4330239346ae74bccd54d6392f46e9bf Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 21 Feb 2019 11:42:48 -0800 Subject: [PATCH] Close the path if necessary when rebuilding it for clipping --- geometry/src/clip.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/geometry/src/clip.rs b/geometry/src/clip.rs index f0060e36..4610e7e5 100644 --- a/geometry/src/clip.rs +++ b/geometry/src/clip.rs @@ -181,6 +181,9 @@ trait ContourClipper where Self::Edge: TEdge { for segment in input.iter() { self.clip_segment_against(segment, &edge); } + if input.is_closed() { + self.contour_mut().close(); + } } fn clip_segment_against(&mut self, mut segment: Segment, edge: &Self::Edge) {