equal
deleted
inserted
replaced
88 |
88 |
89 #include <QDebug> |
89 #include <QDebug> |
90 |
90 |
91 QT_BEGIN_NAMESPACE |
91 QT_BEGIN_NAMESPACE |
92 |
92 |
93 //#define QT_GL_NO_SCISSOR_TEST |
93 #if defined(Q_OS_SYMBIAN) |
|
94 #define QT_GL_NO_SCISSOR_TEST |
|
95 #endif |
|
96 |
94 #if defined(Q_WS_WIN) |
97 #if defined(Q_WS_WIN) |
95 extern Q_GUI_EXPORT bool qt_cleartype_enabled; |
98 extern Q_GUI_EXPORT bool qt_cleartype_enabled; |
96 #endif |
99 #endif |
97 |
100 |
98 extern QImage qt_imageForBrush(int brushStyle, bool invert); |
101 extern QImage qt_imageForBrush(int brushStyle, bool invert); |
372 if (snapToPixelGrid && transform.type() == QTransform::TxTranslate) { |
375 if (snapToPixelGrid && transform.type() == QTransform::TxTranslate) { |
373 // 0.50 needs to rounded down to 0.0 for consistency with raster engine: |
376 // 0.50 needs to rounded down to 0.0 for consistency with raster engine: |
374 dx = ceilf(dx - 0.5f); |
377 dx = ceilf(dx - 0.5f); |
375 dy = ceilf(dy - 0.5f); |
378 dy = ceilf(dy - 0.5f); |
376 } |
379 } |
377 |
380 #ifndef Q_OS_SYMBIAN |
378 if (addOffset) { |
381 if (addOffset) { |
379 dx += 0.49f; |
382 dx += 0.49f; |
380 dy += 0.49f; |
383 dy += 0.49f; |
381 } |
384 } |
382 |
385 #endif |
383 pmvMatrix[0][0] = (wfactor * transform.m11()) - transform.m13(); |
386 pmvMatrix[0][0] = (wfactor * transform.m11()) - transform.m13(); |
384 pmvMatrix[1][0] = (wfactor * transform.m21()) - transform.m23(); |
387 pmvMatrix[1][0] = (wfactor * transform.m21()) - transform.m23(); |
385 pmvMatrix[2][0] = (wfactor * dx) - transform.m33(); |
388 pmvMatrix[2][0] = (wfactor * dx) - transform.m33(); |
386 pmvMatrix[0][1] = (hfactor * transform.m12()) + transform.m13(); |
389 pmvMatrix[0][1] = (hfactor * transform.m12()) + transform.m13(); |
387 pmvMatrix[1][1] = (hfactor * transform.m22()) + transform.m23(); |
390 pmvMatrix[1][1] = (hfactor * transform.m22()) + transform.m23(); |
684 updateMatrix(); |
687 updateMatrix(); |
685 |
688 |
686 const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); |
689 const QPointF* const points = reinterpret_cast<const QPointF*>(path.points()); |
687 |
690 |
688 // ### Remove before release... |
691 // ### Remove before release... |
689 static bool do_vectorpath_cache = qgetenv("QT_OPENGL_NO_PATH_CACHE").isEmpty(); |
692 #ifdef Q_OS_SYMBIAN |
|
693 // ### There are some unresolved issues in Symbian vector path caching. |
|
694 static bool do_vectorpath_cache = false; |
|
695 #else |
|
696 static bool do_vectorpath_cache = true; |
|
697 #endif |
690 |
698 |
691 // Check to see if there's any hints |
699 // Check to see if there's any hints |
692 if (path.shape() == QVectorPath::RectangleHint) { |
700 if (path.shape() == QVectorPath::RectangleHint) { |
693 QGLRect rect(points[0].x(), points[0].y(), points[2].x(), points[2].y()); |
701 QGLRect rect(points[0].x(), points[0].y(), points[2].x(), points[2].y()); |
694 prepareForDraw(currentBrush.isOpaque()); |
702 prepareForDraw(currentBrush.isOpaque()); |