| commit | 147938b5406d1d8291482d542325d708928e6589 | [log] |
|---|---|---|
| author | Luboš Luňák <l.lunak@collabora.com> | Tue May 26 16:48:08 2020 +0200 |
| committer | Luboš Luňák <l.lunak@collabora.com> | Thu May 28 14:36:00 2020 +0200 |
| tree | 2d6fd7ab989e6ff2b48ce65ee77706a3b9b1a3af | |
| parent | beec1b1f594aa345ea4ee5a64bd70f8dccda64c3 [diff] |
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@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 b5b9aad..58d59cf 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)); }