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
Pick-to: 6.2
Change-Id: I80357f61fb879dfb1226d4ef9469ae5c9a9c1147
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
This commit is contained in:
Eirik Aavitsland 2021-10-01 10:30:38 +02:00
parent d093683119
commit 2a546690bf

View File

@ -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));