summaryrefslogtreecommitdiff
path: root/canvas
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 /canvas
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 'canvas')
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index cd9a79ed6245..46f71a17820e 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -1026,16 +1026,18 @@ namespace cairocanvas
// tdf#99165 if the control points are 'empty', create the mathematical
// correct replacement ones to avoid problems with the graphical sub-system
- if(basegfx::fTools::equal(nAX, nLastX) && basegfx::fTools::equal(nAY, nLastY))
+ // 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 (basegfx::fTools::equal(nAX, nLastX) && basegfx::fTools::equal(nAY, nLastY))
{
- nAX = nLastX + ((nBX - nLastX) * 0.3);
- nAY = nLastY + ((nBY - nLastY) * 0.3);
+ nAX = nLastX + ((nBX - nLastX) * 0.0005);
+ nAY = nLastY + ((nBY - nLastY) * 0.0005);
}
if(basegfx::fTools::equal(nBX, nX) && basegfx::fTools::equal(nBY, nY))
{
- nBX = nX + ((nAX - nX) * 0.3);
- nBY = nY + ((nAY - nY) * 0.3);
+ nBX = nX + ((nAX - nX) * 0.0005);
+ nBY = nY + ((nAY - nY) * 0.0005);
}
cairo_curve_to( pCairo, nAX, nAY, nBX, nBY, nX, nY );