summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-04-27 11:44:48 +0200
committerAndras Timar <andras.timar@collabora.com>2021-05-06 16:40:10 +0200
commitca29019ed56b970327ae3c5c215b5db52ff30444 (patch)
tree0e2ed80d916967058a774cbef29e0280a7412454 /cppcanvas
parent8abf1dca16a86ee43fd30786926c9e1556841a9e (diff)
do not apply line dashing in drawinglayer (tdf#136957)
basegfx::utils::applyLineDashing() is not as good as the actual VCL backend dashing, and there are some rounding errors because of all the canvas transformation matrices or whatever, which leads to the drawing problem. So use LineInfo to carry the dashing information. As a part of this change, also make LineInfo use doubles instead of ints. The use of transformation matrices means that the values may be fractional and less than one. Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit b71d9a6d15cfb8a50afdea5ac064f40d84c561f8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115038 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index eea91a021e6b..b04d7a997cd3 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -161,13 +161,13 @@ namespace
// interpret dash info only if explicitly enabled as
// style
const ::basegfx::B2DSize aDistance( rLineInfo.GetDistance(), 0 );
- const double nDistance( (rState.mapModeTransform * aDistance).getX() );
+ const double nDistance( (rState.mapModeTransform * aDistance).getLength() );
const ::basegfx::B2DSize aDashLen( rLineInfo.GetDashLen(), 0 );
- const double nDashLen( (rState.mapModeTransform * aDashLen).getX() );
+ const double nDashLen( (rState.mapModeTransform * aDashLen).getLength() );
const ::basegfx::B2DSize aDotLen( rLineInfo.GetDotLen(), 0 );
- const double nDotLen( (rState.mapModeTransform * aDotLen).getX() );
+ const double nDotLen( (rState.mapModeTransform * aDotLen).getLength() );
const sal_Int32 nNumArryEntries( 2*rLineInfo.GetDashCount() +
2*rLineInfo.GetDotCount() );