Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3044

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/44/3044/1

fdo#61789 - move metafile line width scaling somewhere more sensible.

Change-Id: Ied209fc26f4e1248608277b58bfe59014ad88776
---
M drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
M drawinglayer/source/processor2d/vclprocessor2d.cxx
2 files changed, 12 insertions(+), 6 deletions(-)



diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx 
b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index f9d583d..9663384 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -444,6 +444,15 @@
                     // 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 @@
                             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 adde6aa..1a50490 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1350,7 +1350,7 @@
                     {
                         // #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++)
                         {

-- 
To view, visit https://gerrit.libreoffice.org/3044
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ied209fc26f4e1248608277b58bfe59014ad88776
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Michael Meeks <michael.meeks@suse.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.