summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpaintengine_alpha.cpp
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-03-31 09:07:07 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-03-31 09:10:22 (GMT)
commit3d370dc92466b010bfe6cdd82411f7e3d13da7c1 (patch)
tree9d726dea65ee37c40b852c7555b068a004a869ef /src/gui/painting/qpaintengine_alpha.cpp
parenta0601e169c114f66c5fb932a6cc8606a8151bebc (diff)
downloadQt-3d370dc92466b010bfe6cdd82411f7e3d13da7c1.zip
Qt-3d370dc92466b010bfe6cdd82411f7e3d13da7c1.tar.gz
Qt-3d370dc92466b010bfe6cdd82411f7e3d13da7c1.tar.bz2
Fix text drawing and perspective transforms for the Windows, PDF and
PostScript print engines. The PDF/PostScript does not support perspective transforms, so it has to be emulated through our draw_helper() fallback. PostScript doesn't support alpha blending, so all perspective drawing needs to be forced through the alpha print engine. Task-number: 249754 Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpaintengine_alpha.cpp')
-rw-r--r--src/gui/painting/qpaintengine_alpha.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_alpha.cpp b/src/gui/painting/qpaintengine_alpha.cpp
index e38f6a4..74cbebe 100644
--- a/src/gui/painting/qpaintengine_alpha.cpp
+++ b/src/gui/painting/qpaintengine_alpha.cpp
@@ -80,6 +80,7 @@ bool QAlphaPaintEngine::begin(QPaintDevice *pdev)
d->m_advancedPen = false;
d->m_advancedBrush = false;
d->m_complexTransform = false;
+ d->m_emulateProjectiveTransforms = false;
// clear alpha region
d->m_alphargn = QRegion();
@@ -116,6 +117,9 @@ void QAlphaPaintEngine::updateState(const QPaintEngineState &state)
if (flags & QPaintEngine::DirtyTransform) {
d->m_transform = state.transform();
d->m_complexTransform = (d->m_transform.type() > QTransform::TxScale);
+ d->m_emulateProjectiveTransforms = !(d->m_savedcaps & QPaintEngine::PerspectiveTransform)
+ && !(d->m_savedcaps & QPaintEngine::AlphaBlend)
+ && (d->m_transform.type() >= QTransform::TxProject);
}
if (flags & QPaintEngine::DirtyPen) {
d->m_pen = state.pen();
@@ -163,7 +167,9 @@ void QAlphaPaintEngine::drawPath(const QPainterPath &path)
if (d->m_pass == 0) {
d->m_continueCall = false;
- if (d->m_hasalpha || d->m_advancedPen || d->m_advancedBrush) {
+ if (d->m_hasalpha || d->m_advancedPen || d->m_advancedBrush
+ || d->m_emulateProjectiveTransforms)
+ {
d->addAlphaRect(tr);
}
if (d->m_picengine)
@@ -187,7 +193,9 @@ void QAlphaPaintEngine::drawPolygon(const QPointF *points, int pointCount, Polyg
if (d->m_pass == 0) {
d->m_continueCall = false;
- if (d->m_hasalpha || d->m_advancedPen || d->m_advancedBrush) {
+ if (d->m_hasalpha || d->m_advancedPen || d->m_advancedBrush
+ || d->m_emulateProjectiveTransforms)
+ {
d->addAlphaRect(tr);
}