[Kstars-devel] kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Aug 29 18:12:28 CEST 2003


CVS commit by harris: 

Implement wish #63365.  Cardinal compass point labels (N, NE, E, SE, etc) 
are now drawn along the horizon line, regardless of whether the 
opaque ground is drawn or not.  When the opaque ground is not drawn, the 
compass labels use the horizon color rather than the compass color, 
because the compass color is often very similar to the sky color, which 
would make the labels invisible if that color were used.

Note that compass labels are still only drawn when using Horizontal 
coordinates.  The problem is that the compass labels need to be rotated 
when used with Equatorial coordinates.  I know how to do that, but I am 
going to wait until I add labels to the coordinate grid and ecliptic, so 
that they can all use the same code.

CCMAIL: 63365-done at bugs.kde.org, kstars-devel at kde.org


  M +15 -9     skymapdraw.cpp   1.30


--- kdeedu/kstars/kstars/skymapdraw.cpp  #1.29:1.30
@@ -1103,5 +1103,6 @@ void SkyMap::drawHorizon( QPainter& psky
 
 //              Finish the Ground polygon by adding a square bottom edge, offscreen
-                        if ( options->useAltAz && options->drawGround ) {
+                        if ( options->useAltAz ) { 
+                                if ( options->drawGround ) {
                                 ptsCount = points.count();
                                 pts->setPoint( ptsCount++, Width+100, Height+100 );   //bottom right corner
@@ -1114,10 +1115,15 @@ void SkyMap::drawHorizon( QPainter& psky
                                         points.remove(i);
                                 }
+                                }
 
 //      Draw compass heading labels along horizon
                                 SkyPoint *c = new SkyPoint;
                                 QPoint cpoint;
-                                psky.setPen( QColor ( options->colorScheme()->colorNamed( "CompassColor" ) ) );
                                 psky.setFont( stdFont );
+
+                                if ( options->drawGround ) 
+                                        psky.setPen( QColor ( options->colorScheme()->colorNamed( "CompassColor" ) ) );
+                                else
+                                        psky.setPen( QColor ( options->colorScheme()->colorNamed( "HorzColor" ) ) );
 
                 //North




More information about the Kstars-devel mailing list