Skip to content

Commit 8478f9c

Browse files
author
rblazek
committedMar 13, 2006
atan2, sqrt fix
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5011 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent de5b7ec commit 8478f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/composer/qgscomposerpicture.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,14 @@ void QgsComposerPicture::recalculate()
293293

294294
// Angle between vertical in picture space and the vector
295295
// from center to upper left corner of the picture
296-
double anglePicture = atan2 ( box.width(), box.height() );
296+
double anglePicture = atan2 ( (double)box.width(), (double)box.height() );
297297

298298
// Angle (clockwise) between horizontal in paper space
299299
// and the vector from center to upper left corner of the picture
300300
double anglePaper = PI / 2 - anglePicture - angle;
301301

302302
// Distance from center to upper left corner in canvas units
303-
double r = sqrt ( mWidth*mWidth/4 + mHeight*mHeight/4 );
303+
double r = sqrt ((double)(mWidth*mWidth/4 + mHeight*mHeight/4) );
304304

305305
// Position of upper left corner in map
306306
int dx = (int) ( r * cos ( anglePaper ) );

0 commit comments

Comments
 (0)