[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kstars/unfrozen/kstars/kstars/skycomponents
From: Jason Harris <kstars () 30doradus ! org>
Date: 2008-06-25 6:37:01
Message-ID: 1214375821.460794.13774.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 824172 by harris:
committing patch from James for better progression of
star sizes as a function of magnitude.
CCMAIL: kstars-devel@kde.org
M +6 -5 starcomponent.cpp
--- branches/kstars/unfrozen/kstars/kstars/skycomponents/starcomponent.cpp #824171:824172
@@ -216,12 +216,13 @@
double lgmax = log10(MAXZOOM);
double lgz = log10(Options::zoomFactor());
-
- float maglim = 3.5 * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
+ double magFactor = 4.444;
+ double maglim = magFactor * ( lgz - lgmin ) + Options::magLimitDrawStarZoomOut();
+ double sizeMagLim = magFactor * ( lgz - lgmin ) + 6.0;
m_zoomMagLimit = maglim;
- float sizeFactor = 10.0 + (lgz - lgmin);
+ double maxSize = 10.0;
double labelMagLim = Options::starLabelDensity() / 5.0;
labelMagLim += ( 12.0 - labelMagLim ) * ( lgz - lgmin) / (lgmax - lgmin );
@@ -264,8 +265,8 @@
QPointF o = map->toScreen( curStar );
if ( ! map->onScreen( o ) ) continue;
- float size = ( sizeFactor*( maglim - mag ) / maglim ) + 1.;
- if ( size <= 0. ) continue;
+ float size = maxSize * ( sizeMagLim - mag ) / sizeMagLim;
+ if ( size < 1.0 ) size = 1.0;
curStar->draw( psky, o.x(), o.y(), size, (starColorMode()==0),
starColorIntensity(), true );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic