summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/opengl/gdiimpl.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index bc29e6be7255..bad495bdb1b6 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1601,7 +1601,12 @@ bool OpenGLSalGraphicsImpl::drawPolyLine(const basegfx::B2DPolygon& rPolygon, do
{
VCL_GL_INFO("::drawPolyLine " << rPolygon.getB2DRange());
- mpRenderList->addDrawPolyLine(rPolygon, fTransparency, rLineWidth, eLineJoin, eLineCap,
+ // addDrawPolyLine() assumes that there are no duplicate points in the
+ // polygon.
+ basegfx::B2DPolygon aPolygon(rPolygon);
+ aPolygon.removeDoublePoints();
+
+ mpRenderList->addDrawPolyLine(aPolygon, fTransparency, rLineWidth, eLineJoin, eLineCap,
fMiterMinimumAngle, mnLineColor, mrParent.getAntiAliasB2DDraw());
PostBatchDraw();
return true;