summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawhelper.cpp
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-16 07:50:19 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-16 08:04:33 (GMT)
commit3eeb244251fd3bbfa3c3f421f1362986100d7587 (patch)
tree054549bff40929bbc257e518dc6bbad4bc59faca /src/gui/painting/qdrawhelper.cpp
parentd6d0b4f2b614453ce2ac96067408e0f3b071de78 (diff)
downloadQt-3eeb244251fd3bbfa3c3f421f1362986100d7587.zip
Qt-3eeb244251fd3bbfa3c3f421f1362986100d7587.tar.gz
Qt-3eeb244251fd3bbfa3c3f421f1362986100d7587.tar.bz2
Make subpixel antialiasing of text work on Mac OS X under carbon
Implement the alphaRGBMapForGlyph function and make use of it in the raster engine. The gamma correction is currently hardcoded to 2.0 which looks very good on two separate displays (iMac and MacBook Pro). Ideally this would be picked from the system settings or computed dynamically, but as long as 2.0 works, we'll stick to that. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qdrawhelper.cpp')
-rw-r--r--src/gui/painting/qdrawhelper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 789d96a..63e14ca 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -6933,6 +6933,12 @@ static void qt_alphamapblit_quint16(QRasterBuffer *rasterBuffer,
void qt_build_pow_tables() {
qreal smoothing = 1.7;
+#ifdef Q_WS_MAC
+ // decided by testing a few things on an iMac, should probably get this from the
+ // system...
+ smoothing = 2.0;
+#endif
+
#ifdef Q_WS_WIN
int winSmooth;
if (SystemParametersInfo(0x200C /* SPI_GETFONTSMOOTHINGCONTRAST */, 0, &winSmooth, 0))