[Marble-commits] KDE/kdeedu/marble/src/lib
Bernhard Beschow
bbeschow at cs.tu-berlin.de
Fri Jan 21 00:11:05 CET 2011
SVN commit 1216046 by beschow:
fix compile on ARM (hopefully, building aborted when executing tile creator)
M +3 -2 TileScalingTextureMapper.cpp
M +6 -6 blendings/BlendingAlgorithms.cpp
--- trunk/KDE/kdeedu/marble/src/lib/TileScalingTextureMapper.cpp #1216045:1216046
@@ -103,9 +103,10 @@
const int maxTileX = numTilesX * ( xNormalizedCenter + imageWidth/( 8.0 * radius ) );
const qreal yNormalizedCenter = 0.5 - 0.5 * asinh( tan( centerLat ) ) / M_PI;
- const int minTileY = qMax( numTilesY * ( yNormalizedCenter - imageHeight/( 8.0 * radius ) ),
+ const int minTileY = qMax( qreal( numTilesY * ( yNormalizedCenter - imageHeight/( 8.0 * radius ) ) ),
qreal( 0.0 ));
- const int maxTileY = qMin( numTilesY * ( yNormalizedCenter + imageHeight/( 8.0 * radius ) ), numTilesY - 1.0 );
+ const int maxTileY = qMin( qreal( numTilesY * ( yNormalizedCenter + imageHeight/( 8.0 * radius ) ) ),
+ qreal( numTilesY - 1.0 ) );
if ( texColorizer || m_oldRadius != radius ) {
m_cache->clear();
--- trunk/KDE/kdeedu/marble/src/lib/blendings/BlendingAlgorithms.cpp #1216045:1216046
@@ -80,7 +80,7 @@
qreal const topColorIntensity ) const
{
return qMin( qreal( 1.0 ),
- qMax( qreal( 0.0 ), ( bottomColorIntensity + 2.0 * topColorIntensity ) - 1.0 ));
+ qMax( qreal( 0.0 ), qreal( bottomColorIntensity + 2.0 * topColorIntensity - 1.0 )));
}
qreal OverlayBlending::blendChannel( qreal const bottomColorIntensity,
@@ -120,7 +120,7 @@
Q_UNUSED(topColorIntensity);
// FIXME: check if this formula makes sense
return qMin( qreal( 1.0 ),
- qMax( qreal( 0.0 ), 1.0 - ( 1.0 - bottomColorIntensity ) / topColorIntensity ));
+ qMax( qreal( 0.0 ), qreal( 1.0 - ( 1.0 - bottomColorIntensity ) / topColorIntensity )));
}
qreal DarkBlending::blendChannel( qreal const bottomColorIntensity,
@@ -201,7 +201,7 @@
qreal const topColorIntensity ) const
{
return qMin( qreal( 1.0 ),
- qMax( qreal( 0.0 ), bottomColorIntensity / ( 1.0 - topColorIntensity )));
+ qMax( qreal( 0.0 ), qreal( bottomColorIntensity / ( 1.0 - topColorIntensity ))));
}
qreal GammaLightBlending::blendChannel( qreal const bottomColorIntensity,
@@ -255,9 +255,9 @@
{
return topColorIntensity < 0.5
? qMin( qreal( 1.0 ),
- qMax( qreal( 0.0 ), 1.0 - ( 1.0 - bottomColorIntensity ) / ( 2.0 * topColorIntensity )))
+ qMax( qreal( 0.0 ), qreal( 1.0 - ( 1.0 - bottomColorIntensity ) / ( 2.0 * topColorIntensity ))))
: qMin( qreal( 1.0 ),
- qMax( qreal( 0.0 ), bottomColorIntensity / ( 2.0 * ( 1.0 - topColorIntensity ))));
+ qMax( qreal( 0.0 ), qreal( bottomColorIntensity / ( 2.0 * ( 1.0 - topColorIntensity )))));
}
@@ -284,7 +284,7 @@
qreal DifferenceBlending::blendChannel( qreal const bottomColorIntensity,
qreal const topColorIntensity ) const
{
- return qMax( qMin( qreal( 1.0 ), bottomColorIntensity - topColorIntensity + 0.5 ),
+ return qMax( qMin( qreal( 1.0 ), qreal( bottomColorIntensity - topColorIntensity + 0.5 )),
qreal( 0.0 ));
}
More information about the Marble-commits
mailing list