From 4a5969a74c618e60e93219f03d406a94f8485cab Mon Sep 17 00:00:00 2001 From: jef Date: Thu, 17 Sep 2009 16:26:54 +0000 Subject: [PATCH] fix compile error on windows git-svn-id: http://svn.osgeo.org/qgis/trunk@11674 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/app/qgsmaptoolrotatepointsymbols.cpp | 2 +- src/app/qgspointrotationitem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/qgsmaptoolrotatepointsymbols.cpp b/src/app/qgsmaptoolrotatepointsymbols.cpp index ae8d4931307..565ee4d9c7b 100644 --- a/src/app/qgsmaptoolrotatepointsymbols.cpp +++ b/src/app/qgsmaptoolrotatepointsymbols.cpp @@ -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() diff --git a/src/app/qgspointrotationitem.cpp b/src/app/qgspointrotationitem.cpp index a15fdb4a389..3109f15cd29 100644 --- a/src/app/qgspointrotationitem.cpp +++ b/src/app/qgspointrotationitem.cpp @@ -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 );