[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents
Jérôme Sonrier
jsid at emor3j.fr.eu.org
Thu Feb 10 03:12:37 CET 2011
SVN commit 1219659 by jsonrier:
Print compass labels only if they are on the visible part of hemisphere.
CCMAIL: kstars-devel at 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 );
}
}
More information about the Kstars-devel
mailing list