fix compile error on windows

git-svn-id: http://svn.osgeo.org/qgis/trunk@11674 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
jef 2009-09-17 16:26:54 +00:00
parent 74c7ee9227
commit 4a5969a74c
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ double QgsMapToolRotatePointSymbols::calculateAzimut( const QPoint& mousePos )
{
int dx = mousePos.x() - mSnappedPoint.x();
int dy = mousePos.y() - mSnappedPoint.y();
return 180 - atan2( dx, dy ) * 180.0 / M_PI;
return 180 - atan2( (double) dx, (double) dy ) * 180.0 / M_PI;
}
void QgsMapToolRotatePointSymbols::createPixmapItem()

View File

@ -53,7 +53,7 @@ void QgsPointRotationItem::paint( QPainter * painter )
double h, dAngel;
if ( mPixmap.width() > 0 && mPixmap.height() > 0 )
{
h = sqrt( mPixmap.width() * mPixmap.width() + mPixmap.height() * mPixmap.height() ) / 2; //the half of the item diagonal
h = sqrt( (double) mPixmap.width() * mPixmap.width() + mPixmap.height() * mPixmap.height() ) / 2; //the half of the item diagonal
dAngel = acos( mPixmap.width() / ( h * 2 ) ) * 180 / M_PI; //the diagonal angel of the original rect
x = h * cos(( mRotation - dAngel ) * M_PI / 180 );
y = h * sin(( mRotation - dAngel ) * M_PI / 180 );