summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-01-01 17:07:56 +0000
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-01-01 18:04:41 +0000
commitcd83c269adf8f50e2445788109f6536a41688822 (patch)
tree616284ea2c70114e5858f59b149b05fdf9511220
parentde63446b2c2a01417bf85646696d135c0a5cba02 (diff)
EMF+: mapping can rotate the width vector, so use resulting length.
Otherwise (i.e. with non-vertical lines) the width will be incorrect, and can result in lines disappearing as the resulting X component can be tiny/approaching zero. (cherry picked from commit 83f2b3c590120a60b5e94fb1a15054ebe0745dbb) Conflicts: cppcanvas/source/mtfrenderer/emfplus.cxx Change-Id: Icf3b7c10c627594600b517b8ff445f8df87c56f8
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 613accba5ac2..c8ec849454a4 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -780,7 +780,7 @@ namespace cppcanvas
void SetStrokeWidth(rendering::StrokeAttributes& rStrokeAttributes, ImplRenderer& rR, const OutDevState& rState)
{
EMFP_DEBUG (if (width == 0.0) printf ("EMF+\tTODO: pen with zero width - using minimal which might not be correct\n"));
- rStrokeAttributes.StrokeWidth = fabs((rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getX());
+ rStrokeAttributes.StrokeWidth = fabs((rState.mapModeTransform * rR.MapSize (width == 0.0 ? 0.05 : width, 0)).getLength());
}
void SetStrokeAttributes(rendering::StrokeAttributes& rStrokeAttributes)