summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-03-25 21:33:00 +0000
committerMichael Stahl <mstahl@redhat.com>2013-03-27 19:25:27 +0100
commitf8ca5b1b95b92e9410df6037781680dcd35ff963 (patch)
tree1dff2007d05388192fedd5297e066524cd61fbc4 /drawinglayer
parentacd3b0da305fd6bf52a3d4cb6beb1d5702f68249 (diff)
fdo#61789 - move metafile line width scaling somewhere more sensible.
(cherry picked from commit 432b6ab482d6fcef05514ab17e4bc762ee552139) Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx16
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx2
2 files changed, 12 insertions, 6 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index f9d583d05fb8..9663384aa608 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -444,6 +444,15 @@ namespace drawinglayer
// pre-fill fLineWidth
fLineWidth = pLineAttribute->getWidth();
+ // #i113922# the LineWidth is duplicated in the MetaPolylineAction,
+ // and also inside the SvtGraphicStroke and needs transforming into
+ // the same space as its co-ordinates here cf. fdo#61789
+ // This is a partial fix. When a object transformation is used which
+ // e.g. contains a scaleX != scaleY, an unproportional scaling will happen.
+ const basegfx::B2DVector aDiscreteUnit(maCurrentTransformation *
+ basegfx::B2DVector(pLineAttribute->getWidth(), 0.0 ));
+ fLineWidth = aDiscreteUnit.getLength();
+
// pre-fill fMiterLength
fMiterLength = fLineWidth;
@@ -1233,11 +1242,8 @@ namespace drawinglayer
mpOutputDevice->SetFillColor();
aHairLinePolyPolygon.transform(maCurrentTransformation);
- // #i113922# LineWidth needs to be transformed, too
- const basegfx::B2DVector aDiscreteUnit(maCurrentTransformation * basegfx::B2DVector(rLine.getWidth(), 0.0));
- const double fDiscreteLineWidth(aDiscreteUnit.getLength());
-
- LineInfo aLineInfo(LINE_SOLID, basegfx::fround(fDiscreteLineWidth));
+ // use the transformed line width from the stroke info.
+ LineInfo aLineInfo(LINE_SOLID, basegfx::fround(pSvtGraphicStroke->getStrokeWidth()));
aLineInfo.SetLineJoin(rLine.getLineJoin());
aLineInfo.SetLineCap(rLine.getLineCap());
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index adde6aade165..1a50490e039a 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1350,7 +1350,7 @@ namespace drawinglayer
{
// #i101491# If the polygon complexity uses more than a given amount, do
// use OuputDevice::DrawPolyLine directly; this will avoid buffering all
- // decompositions in primtives (memory) and fallback to old line painting
+ // decompositions in primitives (memory) and fallback to old line painting
// for very complex polygons, too
for(sal_uInt32 a(0); a < nCount; a++)
{