summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-04-27 11:44:48 +0200
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-05-06 04:06:22 +0200
commit57595773df9f89245457443a3def786fa0e70a69 (patch)
tree2a8ec29cbd73bb9c954f0201241b5cf12b977ecb /filter
parenttdf#141963 put focus in vcl parent during Function key processing (diff)
downloadcore-57595773df9f89245457443a3def786fa0e70a69.tar.gz
core-57595773df9f89245457443a3def786fa0e70a69.zip
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 'filter')
-rw-r--r--filter/source/graphicfilter/idxf/dxfvec.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/graphicfilter/idxf/dxfvec.cxx b/filter/source/graphicfilter/idxf/dxfvec.cxx
index fb1ff647d591..58b4d1f6e200 100644
--- a/filter/source/graphicfilter/idxf/dxfvec.cxx
+++ b/filter/source/graphicfilter/idxf/dxfvec.cxx
@@ -207,10 +207,10 @@ LineInfo DXFTransform::Transform(const DXFLineInfo& aDXFLineInfo) const
aLineInfo.SetStyle( aDXFLineInfo.eStyle );
aLineInfo.SetWidth( 0 );
aLineInfo.SetDashCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDashCount ) );
- aLineInfo.SetDashLen( static_cast<sal_Int32>(aDXFLineInfo.fDashLen * scale + 0.5) );
+ aLineInfo.SetDashLen( aDXFLineInfo.fDashLen * scale );
aLineInfo.SetDotCount( static_cast< sal_uInt16 >( aDXFLineInfo.nDotCount ) );
- aLineInfo.SetDotLen( static_cast<sal_Int32>(aDXFLineInfo.fDotLen * scale + 0.5) );
- aLineInfo.SetDistance( static_cast<sal_Int32>(aDXFLineInfo.fDistance * scale + 0.5) );
+ aLineInfo.SetDotLen( aDXFLineInfo.fDotLen * scale );
+ aLineInfo.SetDistance( aDXFLineInfo.fDistance * scale );
if ( aLineInfo.GetDashCount() > 0 && aLineInfo.GetDashLen() == 0 )
aLineInfo.SetDashLen(1);