From be0b2f1eb209c0177500db3bf28bed3631523464 Mon Sep 17 00:00:00 2001 From: Trond Kjernaasen Date: Mon, 15 Mar 2010 15:05:54 +0100 Subject: Fixed cleartype text rendering on translucent surfaces. We were using gamma corrected 11 bit values instead of the 8 bit non- corrected values, which caused some strange rendering effects. Task-number: QTBUG-9036 Reviewed-by: Samuel --- src/gui/painting/qdrawhelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 070491d..2724d7f 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -7174,9 +7174,9 @@ static inline void rgbBlendPixel(quint32 *dst, int coverage, int sr, int sg, int ) { int a = qGray(coverage); - sr = qt_div_255(sr * a); - sg = qt_div_255(sg * a); - sb = qt_div_255(sb * a); + sr = qt_div_255(qt_pow_rgb_invgamma[sr] * a); + sg = qt_div_255(qt_pow_rgb_invgamma[sg] * a); + sb = qt_div_255(qt_pow_rgb_invgamma[sb] * a); int ia = 255 - a; dr = qt_div_255(dr * ia); -- cgit v0.12