[QGIS Commit] r11674 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Sep 17 12:26:56 EDT 2009


Author: jef
Date: 2009-09-17 12:26:54 -0400 (Thu, 17 Sep 2009)
New Revision: 11674

Modified:
   trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.cpp
   trunk/qgis/src/app/qgspointrotationitem.cpp
Log:
fix compile error on windows

Modified: trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.cpp	2009-09-17 14:07:40 UTC (rev 11673)
+++ trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.cpp	2009-09-17 16:26:54 UTC (rev 11674)
@@ -231,7 +231,7 @@
 {
   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()

Modified: trunk/qgis/src/app/qgspointrotationitem.cpp
===================================================================
--- trunk/qgis/src/app/qgspointrotationitem.cpp	2009-09-17 14:07:40 UTC (rev 11673)
+++ trunk/qgis/src/app/qgspointrotationitem.cpp	2009-09-17 16:26:54 UTC (rev 11674)
@@ -53,7 +53,7 @@
   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 );



More information about the QGIS-commit mailing list