mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
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:
parent
74c7ee9227
commit
4a5969a74c
@ -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 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user