[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - vcl/headless

Katarina Behrens (via logerrit) logerrit at kemper.freedesktop.org
Tue Apr 30 08:20:33 UTC 2019


 vcl/headless/svpgdi.cxx |   20 +++++++-------------
 1 file changed, 7 insertions(+), 13 deletions(-)

New commits:
commit 70ecf4bb6d300e02e8765754ef2bb41bd2d851c2
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Fri Apr 26 17:12:41 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Tue Apr 30 10:19:46 2019 +0200

    tdf#120797: Apply transformation also to the extents of damage
    
    since 7034311dce663c895577267110baadbec312d491 affine transformation
    is passed down to drawPolyPolygon and drawPolyLine functions.
    
    The transformation was correctly applied to cairo context, but not
    the extents of damage so those had old, untransformed coordinates and
    were therefore not redrawn
    
    Change-Id: I61ce005ef8770ce5c4560a9d953cd92f440043be
    Reviewed-on: https://gerrit.libreoffice.org/71383
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    
    remove comment in light of fix for tdf#120797
    
    Change-Id: I3093f764a26abdbdb651596352ba74b7fa1c3306
    Reviewed-on: https://gerrit.libreoffice.org/71399
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-on: https://gerrit.libreoffice.org/71534
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index 0e5a07ec7d61..7efb9423359c 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -1136,6 +1136,9 @@ bool SvpSalGraphics::drawPolyLine(
             fMiterMinimumAngle,
             bPixelSnapHairline));
 
+    // if transformation has been applied, transform also extents (ranges)
+    // of damage so they can be correctly redrawn
+    aExtents.transform(rObjectToDevice);
     releaseCairoContext(cr, false, aExtents);
 
     return bRetval;
@@ -1336,21 +1339,9 @@ bool SvpSalGraphics::drawPolyLine(
     }
 
     // extract extents
-    if(nullptr != pExtents)
-    {
-        // This uses cairo_stroke_extents and combines with cairo_clip_extents, so
-        // referring to Cairo-documentation:
-        // "Computes a bounding box in user coordinates covering the area that would
-        //  be affected, (the "inked" area), by a cairo_stroke() operation given the
-        //  current path and stroke parameters."
-        // It *should* use the current set cairo_matrix_t.
+    if (pExtents)
         *pExtents = getClippedStrokeDamage(cr);
 
-        // If not - the following code needs to be used to correct that:
-        // if(!pExtents->isEmpty() && !bObjectToDeviceIsIdentity)
-        //     pExtents->transform(rObjectToDevice);
-    }
-
     // draw and consume
     cairo_stroke(cr);
 
@@ -1483,6 +1474,9 @@ bool SvpSalGraphics::drawPolyPolygon(
         cairo_stroke_preserve(cr);
     }
 
+    // if transformation has been applied, transform also extents (ranges)
+    // of damage so they can be correctly redrawn
+    extents.transform(rObjectToDevice);
     releaseCairoContext(cr, true, extents);
 
     return true;


More information about the Libreoffice-commits mailing list