summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-04-27 11:44:48 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-04-29 16:05:53 +0200
commitb71d9a6d15cfb8a50afdea5ac064f40d84c561f8 (patch)
tree3a9bd3205754d28f411257e0207295a781451d6d /cppcanvas
parent5d4e450a7d64d3dc1caf34544dbfa35f4641d5c3 (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>
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 24f7f3fbf969..a9df9eb2c6b8 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() );