[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Sun Sep 28 19:14:13 CEST 2003
CVS commit by harris:
Deep sky objects with an undefined magnitude were not being drawn. Fixed it,
but now objects with no mag defined are *always* drawn, regardless of faint
mag limit for deep-sky objects. I guess that's the best we can do until we
get mags for all of the deep-sky catalog objects (we miss you, Steinicke
catalog! :( )
Also, two small optimization for drawDeepSkyCatalog(): Moved some variable
definitions dealing with the faint mag limit to outside the object loop
(whoops!). We now checkVisibility() *before* checking the object magnitude
against the faint limit.
CCMAIL: kstars-devel at kde.org
M +20 -21 skymapdraw.cpp 1.38
--- kdeedu/kstars/kstars/skymapdraw.cpp #1.37:1.38
@@ -549,6 +549,4 @@ void SkyMap::drawDeepSkyCatalog( QPainte
QColor colorHST = options->colorScheme()->colorNamed( "HSTColor" );
- //Draw Deep-Sky Objects
- for ( DeepSkyObject *obj = catalog.first(); obj; obj = catalog.next() ) {
//MAGLIMIT
//adjust maglimit for ZoomLevel
@@ -559,9 +557,11 @@ void SkyMap::drawDeepSkyCatalog( QPainte
if ( lgz <= 0.75*lgmax ) maglim -= (options->magLimitDrawDeepSky - options->magLimitDrawDeepSkyZoomOut)*(0.75*lgmax - lgz)/(0.75*lgmax - lgmin);
else maglim = 40.0; //show all deep-sky objects above 0.75*lgmax
- float mag = obj->mag();
- if ( mag == 0.0 || mag > 90.0 ) mag = 14.0;
- if ( ( drawObject || drawImage ) && mag < (float)maglim ) {
+ //Draw Deep-Sky Objects
+ for ( DeepSkyObject *obj = catalog.first(); obj; obj = catalog.next() ) {
if ( checkVisibility( obj, fov(), XRange ) ) {
+ float mag = obj->mag();
+ //only draw objects if flags set and its brighter than maglim (unless mag is undefined (=99.9)
+ if ( ( drawObject || drawImage ) && ( mag > 90.0 || mag < (float)maglim ) ) {
QPoint o = getXY( obj, options->useAltAz, options->useRefraction, scale );
if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) {
@@ -625,4 +625,5 @@ void SkyMap::drawDeepSkyCatalog( QPainte
}
}
+ }
} else { //Object failed checkVisible(); delete it's Image pointer, if it exists.
if ( obj->image() ) {
@@ -631,6 +632,4 @@ void SkyMap::drawDeepSkyCatalog( QPainte
}
}
- }
-
}
More information about the Kstars-devel
mailing list