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.

Change-Id: Icf3b7c10c627594600b517b8ff445f8df87c56f8
This commit is contained in:
Andrzej Hunt
2014-01-01 17:07:56 +00:00
parent 6e04f88d71
commit 83f2b3c590

View File

@@ -786,7 +786,7 @@ namespace cppcanvas
SAL_INFO ("cppcanvas.emf", "TODO: pen with zero width - using minimal which might not be correct\n");
}
#endif
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 SetStrokeDashing(rendering::StrokeAttributes& rStrokeAttributes)