diff -r c810a11d11d9 -r 270593ab83b2 linkablemapobj.cpp --- a/linkablemapobj.cpp Mon May 23 15:28:20 2005 +0000 +++ b/linkablemapobj.cpp Mon May 30 05:39:10 2005 +0000 @@ -1,5 +1,3 @@ -#include - #include "linkablemapobj.h" #include "branchobj.h" #include "mapeditor.h" @@ -449,10 +447,10 @@ double vy=p2y - p1y; // Draw the horizontal line below heading (from ChildPos to ParPos) - bottomline->setPoints (lrint(childPos.x()), - lrint(childPos.y()), - lrint(p1x), - lrint(p1y) ); + bottomline->setPoints (qRound(childPos.x()), + qRound(childPos.y()), + qRound(p1x), + qRound(p1y) ); double a; // angle if (vx > -0.000001 && vx < 0.000001) @@ -460,7 +458,7 @@ else a=atan( vy / vx ); // "turning point" for drawing polygonal links - QPoint tp (-lrint(sin (a)*thickness_start), lrint(cos (a)*thickness_start)); + QPoint tp (-qRound(sin (a)*thickness_start), qRound(cos (a)*thickness_start)); QCanvasLine *cl; @@ -470,10 +468,10 @@ switch (style) { case StyleLine: - l->setPoints( lrint (parPos.x()), - lrint(parPos.y()), - lrint(p2x), - lrint(p2y) ); + l->setPoints( qRound (parPos.x()), + qRound(parPos.y()), + qRound(p2x), + qRound(p2y) ); break; case StyleParabel: parabel (pa0, p1x,p1y,p2x,p2y); @@ -485,15 +483,15 @@ } break; case StylePolyLine: - pa0[0]=QPoint (lrint(p2x+tp.x()), lrint(p2y+tp.y())); - pa0[1]=QPoint (lrint(p2x-tp.x()), lrint(p2y-tp.y())); - pa0[2]=QPoint (lrint (parPos.x()), lrint(parPos.y()) ); + pa0[0]=QPoint (qRound(p2x+tp.x()), qRound(p2y+tp.y())); + pa0[1]=QPoint (qRound(p2x-tp.x()), qRound(p2y-tp.y())); + pa0[2]=QPoint (qRound (parPos.x()), qRound(parPos.y()) ); p->setPoints (pa0); // here too, draw line to avoid missing pixels - l->setPoints( lrint (parPos.x()), - lrint(parPos.y()), - lrint(p2x), - lrint(p2y) ); + l->setPoints( qRound (parPos.x()), + qRound(parPos.y()), + qRound(p2x), + qRound(p2y) ); break; case StylePolyParabel: parabel (pa1, p1x,p1y,p2x+tp.x(),p2y+tp.y()); @@ -709,12 +707,12 @@ m=(vy / (vx*vx)); dx=vx/(arcsegs); int i; - ya.setPoint (0,QPoint (lrint(p1x),lrint(p1y))); + ya.setPoint (0,QPoint (qRound(p1x),qRound(p1y))); for (i=1;i<=arcsegs;i++) { pnx=p1x+dx; pny=m*(pnx-parPos.x())*(pnx-parPos.x())+parPos.y(); - ya.setPoint (i,QPoint (lrint(pnx),lrint(pny))); + ya.setPoint (i,QPoint (qRound(pnx),qRound(pny))); p1x=pnx; p1y=pny; }