Kaydet (Commit) d4b49841 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#115671 vcl opengl: fix drawing of polylines with duplicate points

The bugdoc had a custom shape, the interesting part of it was a triangle
with miter line join, where the last segment was missing. In that case
RenderList::addDrawPolyLine() mishandled the polyline, as it does not
expect duplicate points in it.

Change-Id: I06d5c2d191bb6269a87da1f006f27a94205f5145
Reviewed-on: https://gerrit.libreoffice.org/56879Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
üst 457acbfa
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment