Skip to content
Permalink
Browse files
fix compile error on windows
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@11674 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Sep 17, 2009
1 parent e994042 commit d8f9d3df22d5b445f8943dbd71e6e6a4c5ac490d
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/app/qgsmaptoolrotatepointsymbols.cpp
  2. +1 −1 src/app/qgspointrotationitem.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()
@@ -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 );

0 comments on commit d8f9d3d

Please sign in to comment.