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

James Bowlin bowlin at mindspring.com
Fri Aug 17 19:04:58 CEST 2007


SVN commit 701214 by jbowlin:

Reduced the chance of drawing the Equator or Ecliptic label underneath
the filled horizon by using SkyMap::checkVisibility() on the four
candidate label positions.  This increases the likelihood of these two
labels not getting drawn.  I think this is the correct strategy: don't
draw a label if it won't look good.

CCMAIL: kstars-devel at kde.org


 M  +10 -1     linelistlabel.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/linelistlabel.cpp #701213:701214
@@ -133,9 +133,18 @@
 	// a comfortable angle for viewing;
 	for ( int j = first; j < 4; j++ ) {
 		o[j] = angleAt( map, list[j], idx[j], &a[j], scale );
-		if ( fabs( a[j] ) > comfyAngle ) continue;
+
+		if ( ! idx[j] || ! map->checkVisibility( list[j]->at( idx[j] ) ) ) {
+			okay[j] = false;
+			continue;
+		}
+
+		if ( fabs( a[j] ) > comfyAngle )
+			continue;
+
 		if ( skyLabeler()->drawLabel( psky, o[j], m_text, a[j] ) )
 			return;
+
 		okay[j] = false;
 	}
 


More information about the Kstars-devel mailing list