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

Jason Harris kstars at 30doradus.org
Mon Dec 17 16:21:21 CET 2007


SVN commit 749664 by harris:

Suppress labels when object is below the horizon, without having a
lower priority for horizon labels.

+ Restored order of functions in SkyMapComposite::draw()

+ return false in SkyMap::checkVisibiliity() for objects below the
horizon (if ground is drawn), whether or not the focus point is above
the horizon.

+ Finally fix the misfeature where the ground is not drawn if you go
far enough below the horizon (this was caused by broken logic in
checking if the horizon was offscreen to the bottom!)

CCMAIL: kstars-devel at kde.org



 M  +3 -3      skycomponents/horizoncomponent.cpp  
 M  +2 -4      skycomponents/skymapcomposite.cpp  
 M  +3 -8      skymap.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/horizoncomponent.cpp #749663:749664
@@ -159,7 +159,7 @@
                     pAnchor = p;
 
                 if ( o.y() > 0. ) allGround = false;
-                if ( o.y() < Height && o.y() > 0. ) allSky = false;
+                if ( o.y() < Height ) allSky = false;
             }
         }
         az1 = 0.0;
@@ -176,7 +176,7 @@
                 pAnchor = p;
 
             if ( o.y() > 0. ) allGround = false;
-            if ( o.y() < Height && o.y() > 0. ) allSky = false;
+            if ( o.y() < Height ) allSky = false;
         } else if ( p->az()->Degrees() > az2 )
             break;
     }
@@ -194,7 +194,7 @@
                     pAnchor = p;
 
                 if ( o.y() > 0. ) allGround = false;
-                if ( o.y() < Height && o.y() > 0. ) allSky = false;
+                if ( o.y() < Height ) allSky = false;
             } else
                 break;
         }
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #749663:749664
@@ -232,16 +232,14 @@
     //DISABLE_SATELLITES
     //m_Satellites->draw( ks, psky );
 
+    m_Horizon->draw( ks, psky );
+
     ks->map()->drawObjectLabels( labelObjects(), psky );
 
     m_skyLabeler->drawQueuedLabels( ks, psky );
     m_CNames->draw( ks, psky );
     m_Stars->drawLabels( ks, psky );
 
-    //Draw horizon last, so nothing gets drawn on top of the 
-    //opaque ground except horizon labels
-    m_Horizon->draw( ks, psky );
-
     m_skyMesh->inDraw( false );
 
     //kDebug() << QString("draw took %1 ms").arg( t.elapsed() );
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #749663:749664
@@ -1458,14 +1458,9 @@
     double dX, dY;
     bool useAltAz = Options::useAltAz();
 
-    //Skip objects below the horizon if:
-    // + using Horizontal coords,
-    // + the ground is drawn,
-    // + and either of the following is true:
-    //   - focus is above the horizon
-    //   - field of view is larger than 50 degrees
-    if ( useAltAz && Options::showHorizon() && Options::showGround() && p->alt()->Degrees() < -2.0
-            && ( focus()->alt()->Degrees() > 0. || fov() > 50. ) ) return false;
+    //Skip objects below the horizon if using Horizontal coords,
+    //and the ground is drawn
+    if ( useAltAz && Options::showHorizon() && Options::showGround() && p->alt()->Degrees() < -1.0 ) return false;
 
     if ( useAltAz ) {
         dY = fabs( p->alt()->Degrees() - focus()->alt()->Degrees() );


More information about the Kstars-devel mailing list