[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/plotting
From:       Jason Harris <kstars () 30doradus ! org>
Date:       2007-11-29 16:56:00
Message-ID: 1196355360.698823.13051.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 743009 by harris:

Fixing cosmetic issue in KPlotWidget:
When veritcal/horizontal lines are drawn with integer-value pixel 
coordinates and antialiasing on, the line is made to occupy two rows (or 
columns), each with half transparency.  This makes the lines look 
bloated and fuzzy.  See screenshots in this thread[1].

This patch does a workaround by applying an additional 0.5 pixel offset 
in each direction, using the QPainter::translate() function.  Thus, 
horizontal/vertical lines with integer pixel values occupy a single 
row/column with full opacity.

[1]: http://lists.kde.org/?l=kde-core-devel&m=119632853602093&w=2


 M  +1 -1      kplotwidget.cpp  


--- trunk/KDE/kdelibs/kdeui/plotting/kplotwidget.cpp #743008:743009
@@ -548,7 +548,7 @@
     p.begin( this );
     p.setRenderHint( QPainter::Antialiasing, d->useAntialias );
     p.fillRect( rect(), backgroundColor() );
-    p.translate( leftPadding(), topPadding() );
+    p.translate( leftPadding() + 0.5, topPadding() + 0.5 );
 
     setPixRect();
     p.setClipRect( d->pixRect );
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic