From 7184ae74f4f6f0e89fae9936a6de554cfe64ea76 Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Wed, 1 Jan 2014 17:07:56 +0000 Subject: 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 --- cppcanvas/source/mtfrenderer/emfplus.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 36a6f3094945..0767a507ab41 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -785,7 +785,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) -- cgit v1.2.3