[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents

James Bowlin bowlin at mindspring.com
Mon Sep 3 04:50:59 CEST 2007


SVN commit 707814 by jbowlin:

Turned of anti-aliasing in LineListIndex for most zoom levels as a
temporary workaround for the coordinate grid lockup Jason reported
earlier today.

IMO the outrageously long draw time is a bug in the QT drawLine()
routine when the antialias RenderHint is enabled.  It can take
over a thousand times longer compared to when antialiasing is
disabled.

CCMAIL: kstars-devel at kde.org


 M  +10 -0     linelistindex.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistindex.cpp #707813:707814
@@ -349,6 +349,10 @@
 
 void LineListIndex::drawLinesFloat( KStars *kstars, QPainter& psky, double scale )
 {
+	bool antiAlias = psky.testRenderHint( QPainter::Antialiasing );
+    if ( Options::zoomFactor() < 20.0 * MINZOOM ) 
+        psky.setRenderHint(QPainter::Antialiasing, false );
+	
 	SkyMap *map = kstars->map();
     DrawID drawID = skyMesh()->drawID();
     UpdateID updateID = kstars->data()->updateID();
@@ -402,6 +406,7 @@
             }
         }
     }
+	psky.setRenderHint(QPainter::Antialiasing, antiAlias );
 }
 
 void LineListIndex::drawFilledInt( KStars *kstars, QPainter& psky, double scale)
@@ -465,6 +470,10 @@
 
 void LineListIndex::drawFilledFloat( KStars *kstars, QPainter& psky, double scale )
 {
+	bool antiAlias = psky.testRenderHint( QPainter::Antialiasing );
+    if ( Options::zoomFactor() < 20.0 * MINZOOM ) 
+        psky.setRenderHint(QPainter::Antialiasing, false );
+	
 	SkyMap *map = kstars->map();
     DrawID drawID = skyMesh()->drawID();
     UpdateID updateID = kstars->data()->updateID();
@@ -520,6 +529,7 @@
             polygon.clear();
         }
     }
+	psky.setRenderHint(QPainter::Antialiasing, antiAlias );
 }
 
 void LineListIndex::intro()


More information about the Kstars-devel mailing list