mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-09-19 02:37:56 +08:00
update IsClosed() with Move
This commit is contained in:
@@ -230,9 +230,8 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsClosed()
|
public bool IsClosed()
|
||||||
{
|
{
|
||||||
// need to check if filled -> true if filled
|
|
||||||
if (Commands.Any(c => c is Close)) return true;
|
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 (filtered.Count < 2) return false;
|
||||||
if (!GetStartPoint(filtered.First()).Equals(GetEndPoint(filtered.Last()))) return false;
|
if (!GetStartPoint(filtered.First()).Equals(GetEndPoint(filtered.Last()))) return false;
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user