summaryrefslogtreecommitdiff
path: root/svx
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 /svx
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 'svx')
-rw-r--r--svx/source/xoutdev/xattr.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index 27f11861e927..421094428fb3 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -400,12 +400,12 @@ sal_uInt16 XLineStyleItem::GetValueCount() const
return 3;
}
-XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, sal_uInt32 nTheDotLen,
- sal_uInt16 nTheDashes, sal_uInt32 nTheDashLen, sal_uInt32 nTheDistance) :
+XDash::XDash(css::drawing::DashStyle eTheDash, sal_uInt16 nTheDots, double nTheDotLen,
+ sal_uInt16 nTheDashes, double nTheDashLen, double nTheDistance) :
eDash(eTheDash),
- nDotLen(nTheDotLen),
nDots(nTheDots),
nDashes(nTheDashes),
+ nDotLen(nTheDotLen),
nDashLen(nTheDashLen),
nDistance(nTheDistance)
{
@@ -433,9 +433,9 @@ double XDash::CreateDotDashArray(::std::vector< double >& rDotDashArray, double
rDotDashArray.resize( nNumDotDashArray, 0.0 );
sal_uInt16 a;
sal_uInt16 nIns(0);
- double fDashDotDistance = static_cast<double>(GetDistance());
- double fSingleDashLen = static_cast<double>(GetDashLen());
- double fSingleDotLen = static_cast<double>(GetDotLen());
+ double fDashDotDistance = GetDistance();
+ double fSingleDashLen = GetDashLen();
+ double fSingleDotLen = GetDotLen();
if (fLineWidth == 0.0)
fLineWidth = SMALLEST_DASH_WIDTH;