[Kstars-devel] KDE/kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Thu Apr 24 16:31:09 CEST 2008
SVN commit 800622 by harris:
Two fixes for printing:
(1) Observing list symbols were not being drawn, because the clip rectangle didn't
take the scale factor into account
(2) Star colors remained black if the user chose to "temporarily" switch to the
Chart color scheme when printing. This was due to a bug in ColorScheme::copy().
CCMAIL: kstars-devel at kde.org
M +2 -2 colorscheme.cpp
M +4 -2 skymapdraw.cpp
--- trunk/KDE/kdeedu/kstars/kstars/colorscheme.cpp #800621:800622
@@ -143,8 +143,8 @@
KeyName = cs.KeyName;
Name = cs.Name;
Default = cs.Default;
- StarColorMode = cs.StarColorMode;
- StarColorIntensity = cs.StarColorIntensity;
+ setStarColorMode( cs.StarColorMode );
+ setStarColorIntensity( cs.StarColorIntensity );
Palette = cs.Palette;
FileName = cs.FileName;
}
--- trunk/KDE/kdeedu/kstars/kstars/skymapdraw.cpp #800621:800622
@@ -367,7 +367,8 @@
}
void SkyMap::drawObservingList( QPainter &psky ) {
- psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "ObsListColor" ) ), 1 ) );
+ int penWidth = int(m_Scale);
+ psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "ObsListColor" ) ), penWidth ) );
if ( ks && ks->observingList()->obsList().size() ) {
foreach ( SkyObject* obj, ks->observingList()->obsList() ) {
@@ -375,7 +376,7 @@
QPointF o = toScreen( obj );
// label object if it is currently on screen
- if (o.x() >= 0. && o.x() <= width() && o.y() >=0. && o.y() <= height() ) {
+ if (o.x() >= 0. && o.x() <= width()*m_Scale && o.y() >=0. && o.y() <= height()*m_Scale ) {
if ( Options::obsListSymbol() ) {
if ( Options::useAntialias() ) {
float size = 20.*m_Scale;
@@ -585,6 +586,7 @@
if ( x1 || y1 ) p.translate( x1, y1 );
data->skyComposite()->draw( p );
+ drawObservingList( p );
p.end();
More information about the Kstars-devel
mailing list