summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-11-05 13:58:43 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-11-05 14:18:11 (GMT)
commit86388f7a5224da867ace47a41ed93982dfed7cfc (patch)
tree939ba67bccc3971aa890cbe8ccce711be5a4b972 /src/opengl
parent0818c05f22509a4ee9310f1d313460f422d9d32b (diff)
downloadQt-86388f7a5224da867ace47a41ed93982dfed7cfc.zip
Qt-86388f7a5224da867ace47a41ed93982dfed7cfc.tar.gz
Qt-86388f7a5224da867ace47a41ed93982dfed7cfc.tar.bz2
Use fallback stroker for cosmetic strokes with asymetric transforms
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index d20700f..1527e72 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1221,6 +1221,9 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
}
}
+extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+
+
void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
{
Q_D(QGL2PaintEngineEx);
@@ -1231,6 +1234,11 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
return;
QOpenGL2PaintEngineState *s = state();
+ if (pen.isCosmetic() && !qt_scaleForTransform(s->transform(), 0)) {
+ // QTriangulatingStroker class is not meant to support cosmetically sheared strokes.
+ QPaintEngineEx::stroke(path, pen);
+ return;
+ }
ensureActive();