mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-18 18:27:55 +08:00
update IsClosed() with Move
This commit is contained in:
@@ -230,9 +230,8 @@
|
||||
/// </summary>
|
||||
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;
|
||||
|
Reference in New Issue
Block a user