summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b2dsvgpolypolygon.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basegfx/source/polygon/b2dsvgpolypolygon.cxx')
-rw-r--r--basegfx/source/polygon/b2dsvgpolypolygon.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index b73154308082..bb0b63a7cfc0 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -767,6 +767,10 @@ namespace basegfx
if(aCurrPoly.count())
{
+ const B2DPoint aFirstPoint(aCurrPoly.getB2DPoint(0));
+ const B2DPoint aLastPoint(aCurrPoly.getB2DPoint(aCurrPoly.count()-1));
+ if ( (aFirstPoint.getX()-aLastPoint.getX())*(aFirstPoint.getX()-aLastPoint.getX()) +
+ (aFirstPoint.getY()-aLastPoint.getY())*(aFirstPoint.getY()-aLastPoint.getY()) < 1 ) bIsClosed = true;
// end-process last poly
if(bIsClosed)
{