diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-05 13:58:43 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-11-05 14:18:11 (GMT) |
commit | 86388f7a5224da867ace47a41ed93982dfed7cfc (patch) | |
tree | 939ba67bccc3971aa890cbe8ccce711be5a4b972 /src/opengl | |
parent | 0818c05f22509a4ee9310f1d313460f422d9d32b (diff) | |
download | Qt-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.cpp | 8 |
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(); |