[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/skia

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Thu May 28 12:36:36 UTC 2020


 vcl/skia/gdiimpl.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 147938b5406d1d8291482d542325d708928e6589
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue May 26 16:48:08 2020 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Thu May 28 14:36:00 2020 +0200

    properly scale stroke values in Skia drawPolyLine()
    
    Related to the previous commit where I forgot to do this.
    Makes a difference e.g. for
    https://bugs.documentfoundation.org/show_bug.cgi?id=130478#c37
    
    Change-Id: Id52f8db1580a78aec7c1e4764a5872f027c85a96
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94874
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
    (cherry picked from commit dbcf176d8ac1945b8f1e3c95d1401d0f1f85584d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94961

diff --git a/vcl/skia/gdiimpl.cxx b/vcl/skia/gdiimpl.cxx
index b5b9aad6ae22..58d59cf5aabe 100644
--- a/vcl/skia/gdiimpl.cxx
+++ b/vcl/skia/gdiimpl.cxx
@@ -810,7 +810,9 @@ bool SkiaSalGraphicsImpl::drawPolyLine(const basegfx::B2DHomMatrix& rObjectToDev
     if (pStroke && std::accumulate(pStroke->begin(), pStroke->end(), 0.0) != 0)
     {
         std::vector<SkScalar> intervals;
-        intervals.assign(pStroke->begin(), pStroke->end());
+        // Transform size by the matrix.
+        for (double stroke : *pStroke)
+            intervals.push_back((rObjectToDevice * basegfx::B2DVector(stroke, 0)).getLength());
         aPaint.setPathEffect(SkDashPathEffect::Make(intervals.data(), intervals.size(), 0));
     }
 


More information about the Libreoffice-commits mailing list