summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-12 12:03:30 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2010-04-12 12:22:32 (GMT)
commit67e8e5baeec38d592596f259894e6dda420728ea (patch)
tree954e66b73a5eb53ab4225d75bec5d2018cf11707 /src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
parent97f5d3f102c6b3167872c5ab1c6e0a215cb2f1c1 (diff)
downloadQt-67e8e5baeec38d592596f259894e6dda420728ea.zip
Qt-67e8e5baeec38d592596f259894e6dda420728ea.tar.gz
Qt-67e8e5baeec38d592596f259894e6dda420728ea.tar.bz2
Fix antialiasing with transformed text in OpenGL2 paint engine
Since the paint engine now transforms the prerendered glyphs instead of rendering transformed glyphs as paths, we need to turn on texture filtering to avoid antialiasing artifacts. In order to do this, we also need to pad the glyphs in the glyph cache, otherwise you will get artifacts when sampling the area around the glyph's bounding rect (where there might be other glyphs.) This done by adding a glyphPadding() function to the cache which returns the number of pixels to pad between each glyph. Task-number: QTBUG-9706 Reviewed-by: Tom
Diffstat (limited to 'src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 6cb76ee..994c1c9 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -246,4 +246,9 @@ int QGLTextureGlyphCache::glyphMargin() const
#endif
}
+int QGLTextureGlyphCache::glyphPadding() const
+{
+ return 1;
+}
+
QT_END_NAMESPACE