[Uml-devel] kdesdk/umbrello/umbrello

Jonathan Riddell jri at jriddell.org
Wed Mar 19 11:22:03 UTC 2003


CVS commit by jriddell: 

replaced the old round() funation calls to rint() which works with GCC 2.95


  M +8 -8      linepath.cpp   1.7


--- kdesdk/umbrello/umbrello/linepath.cpp  #1.6:1.7
@@ -375,9 +375,9 @@ void LinePath::calculateHead() {
 
         m_LastPoint = getPoint(size - 1);
-        m_ArrowPointA.setX( (int)(m_LastPoint.x() - halfLength * cos(arrowSlope)) );
-        m_ArrowPointA.setY( (int)(m_LastPoint.y() - halfLength * sin(arrowSlope)) );
+        m_ArrowPointA.setX( (int)rint(m_LastPoint.x() - halfLength * cos(arrowSlope)) );
+        m_ArrowPointA.setY( (int)rint(m_LastPoint.y() - halfLength * sin(arrowSlope)) );
         arrowSlope = slope - arrowAngle;
-        m_ArrowPointB.setX( (int)(m_LastPoint.x() - halfLength * cos(arrowSlope)) );
-        m_ArrowPointB.setY( (int)(m_LastPoint.y() - halfLength * sin(arrowSlope)) );
+        m_ArrowPointB.setX( (int)rint(m_LastPoint.x() - halfLength * cos(arrowSlope)) );
+        m_ArrowPointB.setY( (int)rint(m_LastPoint.y() - halfLength * sin(arrowSlope)) );
 
         if(xa > xb)
@@ -391,8 +391,8 @@ void LinePath::calculateHead() {
                 siny = siny > 0 ? siny * -1 : siny;
 
-        m_MidPoint.setX( (int)(m_LastPoint.x() + cosx) );
-        m_MidPoint.setY( (int)(m_LastPoint.y() + siny) );
-        m_FullPoint.setX( (int)(m_LastPoint.x() + cosx * 2) );
-        m_FullPoint.setY( (int)(m_LastPoint.y() + siny * 2) );
+        m_MidPoint.setX( (int)rint(m_LastPoint.x() + cosx) );
+        m_MidPoint.setY( (int)rint(m_LastPoint.y() + siny) );
+        m_FullPoint.setX( (int)rint(m_LastPoint.x() + cosx * 2) );
+        m_FullPoint.setY( (int)rint(m_LastPoint.y() + siny * 2) );
 
         m_PointArray.setPoint(0, m_LastPoint);






More information about the umbrello-devel mailing list