diff options
Diffstat (limited to 'src/gui/opengl/qopenglpaintengine.cpp')
-rw-r--r-- | src/gui/opengl/qopenglpaintengine.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index e0f1fe50a6..624eeaffd9 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -1194,7 +1194,7 @@ void QOpenGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) return; QOpenGL2PaintEngineState *s = state(); - if (pen.isCosmetic() && !qt_scaleForTransform(s->transform(), 0)) { + if (qt_pen_is_cosmetic(pen, state()->renderHints) && !qt_scaleForTransform(s->transform(), 0)) { // QTriangulatingStroker class is not meant to support cosmetically sheared strokes. QPaintEngineEx::stroke(path, pen); return; @@ -1229,15 +1229,16 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p : QRectF(0, 0, width, height)); if (penStyle == Qt::SolidLine) { - stroker.process(path, pen, clip); + stroker.process(path, pen, clip, s->renderHints); } else { // Some sort of dash - dasher.process(path, pen, clip); + dasher.process(path, pen, clip, s->renderHints); QVectorPath dashStroke(dasher.points(), dasher.elementCount(), - dasher.elementTypes()); - stroker.process(dashStroke, pen, clip); + dasher.elementTypes(), + s->renderHints); + stroker.process(dashStroke, pen, clip, s->renderHints); } if (!stroker.vertexCount()) @@ -1261,7 +1262,7 @@ void QOpenGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &p ? qMax(pen.miterLimit() * width, width) : width; - if (pen.isCosmetic()) + if (qt_pen_is_cosmetic(pen, q->state()->renderHints)) extra = extra * inverseScale; QRectF bounds = path.controlPointRect().adjusted(-extra, -extra, extra, extra); @@ -1637,7 +1638,7 @@ void QOpenGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type continue; int x = qFloor(staticTextItem->glyphPositions[i].x) + c.baseLineX - margin; - int y = qFloor(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; + int y = qRound(staticTextItem->glyphPositions[i].y) - c.baseLineY - margin; vertexCoordinates->addQuad(QRectF(x, y, c.w, c.h)); textureCoordinates->addQuad(QRectF(c.x*dx, c.y*dy, c.w * dx, c.h * dy)); |