Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 d8f9d3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsmaptoolrotatepointsymbols.cpp
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgspointrotationitem.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit d8f9d3d

Please sign in to comment.