summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-05-26 16:48:08 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-05-28 14:36:00 +0200
commit147938b5406d1d8291482d542325d708928e6589 (patch)
tree2d6fd7ab989e6ff2b48ce65ee77706a3b9b1a3af /vcl
parentbeec1b1f594aa345ea4ee5a64bd70f8dccda64c3 (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
Diffstat (limited to 'vcl')
-rw-r--r--vcl/skia/gdiimpl.cxx4
1 files changed, 3 insertions, 1 deletions
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));
}