diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-10-01 10:30:38 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-10-05 19:09:34 +0000 |
commit | 4901e9215b9a406ca45e6efe676cf21961f7d774 (patch) | |
tree | 9add2a16d4c38ccc4b830284243efc0b56986d2e /src | |
parent | 28ef2c4a2b65d0a7679b9791b9933f450abd6dcc (diff) |
Support transformations in pattern/texture brushes in pdf
The brush transform was ignored for pattern/texture brushes. Since
fill patterns always have a transform in pdf anyway, we can just
multiply in the brush transform.
Fixes: QTBUG-96978
Change-Id: I80357f61fb879dfb1226d4ef9469ae5c9a9c1147
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
(cherry picked from commit 2a546690bf457f4bfee0910ba979441511843f8b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index d3d7483cd0..2d25b5811e 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -2760,6 +2760,8 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor, return gradientBrush(brush, matrix, gStateObject); } + matrix = brush.transform() * matrix; + if ((!brush.isOpaque() && brush.style() < Qt::LinearGradientPattern) || opacity != 1.0) *gStateObject = addConstantAlphaObject(qRound(brush.color().alpha() * opacity), qRound(pen.color().alpha() * opacity)); |