[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/kstars/kstars/skycomponents
From:       Jérôme Sonrier <jsid () emor3j ! fr ! eu ! org>
Date:       2011-02-10 2:12:37
Message-ID: 20110210021237.A78FFAC8C0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1219659 by jsonrier:

Print compass labels only if they are on the visible part of hemisphere.


CCMAIL: kstars-devel@kde.org



 M  +4 -2      horizoncomponent.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/horizoncomponent.cpp #1219658:1219659
@@ -441,6 +441,7 @@
 void HorizonComponent::drawCompassLabels( SkyPainter *skyp ) {
     SkyPoint c;
     QPointF cpoint;
+    bool visible;
 
     const Projector *proj = SkyMap::Instance()->projector();
     KStarsData *data = KStarsData::Instance();
@@ -465,8 +466,9 @@
         if ( !Options::useAltAz() ) {
             c.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
         }
-        cpoint = proj->toScreen( &c, false );
-        if ( proj->onScreen(cpoint) ) {
+        
+        cpoint = proj->toScreen( &c, false, &visible );
+        if ( visible && proj->onScreen(cpoint) ) {
             skyLabeler->drawGuideLabel( cpoint, name[i], 0.0 );
         }
     }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic