[Marble-commits] KDE/kdeedu/marble/src/lib
Jens-Michael Hoffmann
jensmh at gmx.de
Tue Mar 23 09:29:05 CET 2010
SVN commit 1106550 by jmhoffmann:
Unify StackedTile::rawtile() and StackedTile::tile() with new method(s)
StackedTile::resultTile().
Besides don't return by copy anymore, not needed here.
M +1 -1 AbstractScanlineTextureMapper.cpp
M +1 -1 MarbleModel.cpp
M +1 -1 MergedLayerDecorator.cpp
M +4 -4 StackedTile.cpp
M +2 -2 StackedTile.h
--- trunk/KDE/kdeedu/marble/src/lib/AbstractScanlineTextureMapper.cpp #1106549:1106550
@@ -617,7 +617,7 @@
TileId id( m_textureLayer->sourceDir(), 0, 0, 0 );
StackedTile * const testTile = m_tileLoader->loadTile( id );
Q_ASSERT( testTile );
- m_tileSize = testTile->rawtile().size();
+ m_tileSize = testTile->resultTile()->size();
Q_ASSERT( !m_tileSize.isEmpty() );
}
--- trunk/KDE/kdeedu/marble/src/lib/MarbleModel.cpp #1106549:1106550
@@ -844,7 +844,7 @@
// << "requestTileUpdate" << requestTileUpdate;
d->m_layerDecorator->setInfo( tile->id() );
- d->m_layerDecorator->setTile( tile->tile() );
+ d->m_layerDecorator->setTile( tile->resultTile() );
d->m_layerDecorator->paint( "maps/" + textureLayer->sourceDir(), mapTheme() );
}
--- trunk/KDE/kdeedu/marble/src/lib/MergedLayerDecorator.cpp #1106549:1106550
@@ -134,7 +134,7 @@
if ( tile->state() == StackedTile::TileEmpty )
return;
- QImage * nighttile = tile->tile();
+ QImage * nighttile = tile->resultTile();
for ( int cur_y = 0; cur_y < tileHeight; ++cur_y ) {
qreal lat = lat_scale * ( m_id.y() * tileHeight + cur_y ) - 0.5*M_PI;
--- trunk/KDE/kdeedu/marble/src/lib/StackedTile.cpp #1106549:1106550
@@ -360,14 +360,14 @@
return d->m_resultTile.numBytes();
}
-QImage StackedTile::rawtile()
+QImage const * StackedTile::resultTile() const
{
- return d->m_resultTile;
+ return &d->m_resultTile;
}
-QImage * StackedTile::tile()
+QImage * StackedTile::resultTile()
{
- return &(d->m_resultTile);
+ return &d->m_resultTile;
}
bool StackedTile::hasTiles() const
--- trunk/KDE/kdeedu/marble/src/lib/StackedTile.h #1106549:1106550
@@ -48,8 +48,8 @@
bool forMergedLayerDecorator() const;
void setForMergedLayerDecorator();
- QImage rawtile();
- QImage *tile();
+ QImage const * resultTile() const;
+ QImage * resultTile();
// Here we retrieve the color value of the requested pixel on the tile.
// This needs to be done differently for grayscale ( uchar, 1 byte ).
More information about the Marble-commits
mailing list