summaryrefslogtreecommitdiff
path: root/vcl/unx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2016-07-21 11:10:53 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2016-07-28 09:42:07 +0000
commitffa1c7bc86093b8445656bab1538939b9d3a6d88 (patch)
tree1013244466da96c92c7c9907dd1d3d62547b787c /vcl/unx
parent11ded42ef7f056072e7bf1fb66a0e1ec5a556317 (diff)
tdf#101026 Create more correct replacement control vector
Change-Id: I909adaab3dca3c1bac4331b164343cdbc1205df2 Reviewed-on: https://gerrit.libreoffice.org/27365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'vcl/unx')
-rw-r--r--vcl/unx/generic/gdi/salgdi.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index 66c9e6248bbc..72daa7165bc3 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -825,14 +825,16 @@ bool X11SalGraphics::drawPolyLine(
// miter graphics (and maybe others) when empty control points
// are used, so fallback to the mathematical 'default' control
// points in that case
- if(aStart.equal(aCP1))
+ // tdf#101026 The 1st attempt to create a mathematically correct replacement control
+ // vector was wrong. Best alternative is one as close as possible which means short.
+ if (aStart.equal(aCP1))
{
- aCP1 = aStart + ((aCP2 - aStart) * 0.3);
+ aCP1 = aStart + ((aCP2 - aStart) * 0.0005);
}
if(aEnd.equal(aCP2))
{
- aCP2 = aEnd + ((aCP1 - aEnd) * 0.3);
+ aCP2 = aEnd + ((aCP1 - aEnd) * 0.0005);
}
cairo_curve_to(cr,