From 16a17f3b8dd315526935fa0731bfa053b16f5373 Mon Sep 17 00:00:00 2001 From: BobLd Date: Thu, 2 Apr 2020 20:37:35 +0100 Subject: [PATCH] update IsClosed() with Move --- src/UglyToad.PdfPig.Core/PdfSubpath.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/UglyToad.PdfPig.Core/PdfSubpath.cs b/src/UglyToad.PdfPig.Core/PdfSubpath.cs index 9b9fd2a3..fdeb89fa 100644 --- a/src/UglyToad.PdfPig.Core/PdfSubpath.cs +++ b/src/UglyToad.PdfPig.Core/PdfSubpath.cs @@ -230,9 +230,8 @@ /// public bool IsClosed() { - // need to check if filled -> true if filled if (Commands.Any(c => c is Close)) return true; - var filtered = Commands.Where(c => c is Line || c is BezierCurve).ToList(); + var filtered = Commands.Where(c => c is Line || c is BezierCurve || c is Move).ToList(); if (filtered.Count < 2) return false; if (!GetStartPoint(filtered.First()).Equals(GetEndPoint(filtered.Last()))) return false; return true;