Skip to content

Commit 30d4b24

Browse files
author
rblazek
committed
round coordinates
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5176 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9c03a12 commit 30d4b24

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/plugins/grass/qgsgrassedit.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,8 @@ void QgsGrassEdit::displayElement ( int line, const QPen & pen, int size, QPaint
15191519
point.setX(mPoints->x[i]);
15201520
point.setY(mPoints->y[i]);
15211521
mTransform->transform(&point);
1522-
pointArray.setPoint( i, static_cast<int>(point.x()),
1523-
static_cast<int>(point.y()) );
1522+
pointArray.setPoint( i, static_cast<int>(round(point.x())),
1523+
static_cast<int>(round(point.y())) );
15241524
}
15251525

15261526
myPainter->setPen ( pen );
@@ -1634,8 +1634,8 @@ void QgsGrassEdit::displayIcon ( double x, double y, const QPen & pen,
16341634
point.setY(y);
16351635
mTransform->transform(&point);
16361636

1637-
int px = static_cast<int>(point.x());
1638-
int py = static_cast<int>(point.y());
1637+
int px = static_cast<int>(round(point.x()));
1638+
int py = static_cast<int>(round(point.y()));
16391639
int m = (size-1)/2;
16401640

16411641
QPainter *myPainter;

0 commit comments

Comments
 (0)