File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -231,7 +231,7 @@ double QgsMapToolRotatePointSymbols::calculateAzimut( const QPoint& mousePos )
231
231
{
232
232
int dx = mousePos.x () - mSnappedPoint .x ();
233
233
int dy = mousePos.y () - mSnappedPoint .y ();
234
- return 180 - atan2 ( dx, dy ) * 180.0 / M_PI;
234
+ return 180 - atan2 ( ( double ) dx, ( double ) dy ) * 180.0 / M_PI;
235
235
}
236
236
237
237
void QgsMapToolRotatePointSymbols::createPixmapItem ()
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ void QgsPointRotationItem::paint( QPainter * painter )
53
53
double h, dAngel;
54
54
if ( mPixmap .width () > 0 && mPixmap .height () > 0 )
55
55
{
56
- h = sqrt ( mPixmap .width () * mPixmap .width () + mPixmap .height () * mPixmap .height () ) / 2 ; // the half of the item diagonal
56
+ h = sqrt ( ( double ) mPixmap .width () * mPixmap .width () + mPixmap .height () * mPixmap .height () ) / 2 ; // the half of the item diagonal
57
57
dAngel = acos ( mPixmap .width () / ( h * 2 ) ) * 180 / M_PI; // the diagonal angel of the original rect
58
58
x = h * cos (( mRotation - dAngel ) * M_PI / 180 );
59
59
y = h * sin (( mRotation - dAngel ) * M_PI / 180 );
You can’t perform that action at this time.
0 commit comments