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

Jason Harris kstars at 30doradus.org
Fri May 2 00:35:01 CEST 2008


SVN commit 803096 by harris:

Improve rendering of comets and asteroids.  Minimum size is 0.25
instead of 1, and below a threshhold zoom, comets are no longer drawn.
CCMAIL: kstars-devel at kde.org


 M  +1 -1      asteroidscomponent.cpp  
 M  +2 -2      cometscomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/asteroidscomponent.cpp #803095:803096
@@ -118,7 +118,7 @@
         if ( ! map->onScreen( o ) ) continue;
 
         float size = ast->angSize() * sizeFactor;
-        if ( size < 1.0 ) size = 1.0;
+        if ( size < 0.25 ) size = 0.25;
         float x1 = o.x() - 0.5 * size;
         float y1 = o.y() - 0.5 * size;
 
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/cometscomponent.cpp #803095:803096
@@ -80,7 +80,7 @@
 
 void CometsComponent::draw( QPainter& psky )
 {
-    if ( !visible() ) return;
+    if ( !visible() || Options::zoomFactor() < 10*MINZOOM ) return;
 
     SkyMap *map = SkyMap::Instance();
 
@@ -101,7 +101,7 @@
         //if ( ( o.x() >= 0. && o.x() <= Width && o.y() >= 0. && o.y() <= Height ) )
 
         float size = com->angSize() * map->scale() * dms::PI * Options::zoomFactor()/10800.0;
-        if ( size < 1 ) size = 1;
+				if ( size < 0.25 && Options::zoomFactor() > 10*MINZOOM ) size = 0.25;
         float x1 = o.x() - 0.5*size;
         float y1 = o.y() - 0.5*size;
 


More information about the Kstars-devel mailing list