From f9a6458f4abf8327354d227b3dd87bbab50d44e9 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Mon, 11 Jan 2010 15:43:52 +0100 Subject: Fixed justify aligned text drawing with the GL1 engine. The text was blurry because it wasn't pixel aligned. Fixed by using nearest-neighbour texture filtering when using only translations on the painter. Reviewed-by: Trond --- src/opengl/qpaintengine_opengl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 8dae02a..d20f96c 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -4931,7 +4931,8 @@ void QOpenGLPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textIte glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); - bool antialias = !(ti.fontEngine->fontDef.styleStrategy & QFont::NoAntialias); + bool antialias = !(ti.fontEngine->fontDef.styleStrategy & QFont::NoAntialias) + && (d->matrix.type() > QTransform::TxTranslate); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, antialias ? GL_LINEAR : GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, antialias ? GL_LINEAR : GL_NEAREST); -- cgit v0.12