diff options
author | Tor Lillqvist <tml@collabora.com> | 2016-06-01 13:30:59 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2016-06-01 11:02:06 +0000 |
commit | 3bbdd817042a665d8f02a2bd4ee668840791bc7f (patch) | |
tree | 46a51ba82014a777c8fb7e4308694659eb827f07 | |
parent | 35dd224accca2a4a02a3d93ef460b91b5416fec2 (diff) |
tdf#95581: Assume tiny shears are rounding artefacts etc and can be ignored
See bug report for more discussion.
Change-Id: I50ee82abac4ddfbdca0fb03d17c0518860466a52
Reviewed-on: https://gerrit.libreoffice.org/25766
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 67625c0b85a4..f113c723d69a 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <cmath> #include <comphelper/string.hxx> #include "vclprocessor2d.hxx" #include <drawinglayer/primitive2d/textprimitive2d.hxx> @@ -107,7 +108,9 @@ namespace drawinglayer aLocalTransform.decompose(aFontScaling, aTranslate, fRotate, fShearX); bool bPrimitiveAccepted(false); - if(basegfx::fTools::equalZero(fShearX)) + // tdf#95581: Assume tiny shears are rounding artefacts or whatever and can be ignored, + // especially if the effect is less than a pixel. + if(std::abs(aFontScaling.getY() * fShearX) < 1) { if(basegfx::fTools::less(aFontScaling.getX(), 0.0) && basegfx::fTools::less(aFontScaling.getY(), 0.0)) { |