diff options
author | Volker Stolz <vs@FreeBSD.org> | 2005-01-29 15:28:51 +0000 |
---|---|---|
committer | Volker Stolz <vs@FreeBSD.org> | 2005-01-29 15:28:51 +0000 |
commit | 1136813ee017e6acd68abe0c54d9f5dd38301de4 (patch) | |
tree | 28938c804e1aa65e830db09017accbbd7ba5d0f0 /deskutils/vym/files | |
parent | f13167c08841f87d194faecb15d50e2ac0320a61 (diff) | |
download | ports-1136813ee017e6acd68abe0c54d9f5dd38301de4.tar.gz ports-1136813ee017e6acd68abe0c54d9f5dd38301de4.zip |
Notes
Diffstat (limited to 'deskutils/vym/files')
-rw-r--r-- | deskutils/vym/files/patch-floatimageobj.cpp | 26 | ||||
-rw-r--r-- | deskutils/vym/files/patch-linkablemapobj.cpp | 102 | ||||
-rw-r--r-- | deskutils/vym/files/patch-misc.cpp | 31 | ||||
-rw-r--r-- | deskutils/vym/files/patch-xml.cpp | 10 |
4 files changed, 119 insertions, 50 deletions
diff --git a/deskutils/vym/files/patch-floatimageobj.cpp b/deskutils/vym/files/patch-floatimageobj.cpp index 1ece7c0af72f..682518bd12ce 100644 --- a/deskutils/vym/files/patch-floatimageobj.cpp +++ b/deskutils/vym/files/patch-floatimageobj.cpp @@ -1,15 +1,19 @@ ---- floatimageobj.cpp.orig Sun Sep 26 22:45:56 2004 -+++ floatimageobj.cpp Sun Oct 17 17:12:27 2004 -@@ -2,6 +2,12 @@ +--- floatimageobj.cpp.orig Tue Oct 19 18:31:12 2004 ++++ floatimageobj.cpp Sat Jan 15 12:25:08 2005 +@@ -1,6 +1,6 @@ ++#include <math.h> + #include "floatimageobj.h" #include "branchobj.h" - #include <math.h> +-#include <math.h> -+#if !defined(HAVE_LRINTF) -+static inline long int lrint(double x) -+{ -+ return (long)(rint(x)); -+} -+#endif ///////////////////////////////////////////////////////////////// - // FloatImageObj +@@ -67,7 +67,7 @@ + + int FloatImageObj::z () + { +- return lrint (icon->z()); ++ return (long)rint (icon->z()); + } + + bool FloatImageObj::load (const QString &fn) diff --git a/deskutils/vym/files/patch-linkablemapobj.cpp b/deskutils/vym/files/patch-linkablemapobj.cpp index dbdc7306bd4a..c2200236fd30 100644 --- a/deskutils/vym/files/patch-linkablemapobj.cpp +++ b/deskutils/vym/files/patch-linkablemapobj.cpp @@ -1,33 +1,85 @@ ---- linkablemapobj.cpp.orig Fri Sep 24 16:50:15 2004 -+++ linkablemapobj.cpp Thu Oct 21 17:22:44 2004 -@@ -6,6 +6,12 @@ +--- linkablemapobj.cpp.orig Tue Jan 4 10:49:50 2005 ++++ linkablemapobj.cpp Sat Jan 15 12:41:45 2005 +@@ -1,4 +1,4 @@ +-//#include <math.h> ++#include <math.h> - #include "version.h" + #include "linkablemapobj.h" + #include "branchobj.h" +@@ -456,10 +456,10 @@ + double vy=p2y - p1y; -+#if !defined(HAVE_LRINTF) -+static inline long int lrint(double x) -+{ -+ return (long)(rint(x)); -+} -+#endif - - ///////////////////////////////////////////////////////////////// - // LinkableMapObj -@@ -400,7 +406,7 @@ - lrint(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 ((long)rint(childPos.x()), ++ (long)rint(childPos.y()), ++ (long)rint(p1x), ++ (long)rint(p1y) ); double a; // angle -- if (abs(vx)<0.000001) -+ if (fabs(vx)<0.000001) - a=M_PI_2; + if (vx > -0.000001 && vx < 0.000001) +@@ -467,7 +467,7 @@ else a=atan( vy / vx ); -@@ -611,7 +617,7 @@ - double pny; - double m; + // "turning point" for drawing polygonal links +- QPoint tp (-lrint(sin (a)*thickness_start), lrint(cos (a)*thickness_start)); ++ QPoint tp (-(long)rint(sin (a)*thickness_start), (long)rint(cos (a)*thickness_start)); + + QCanvasLine *cl; -- if (abs(vx) <0.0001) -+ if (fabs(vx) <0.0001) - m=0; - else +@@ -477,10 +477,10 @@ + switch (style) + { + case StyleLine: +- l->setPoints( lrint (parPos.x()), +- lrint(parPos.y()), +- lrint(p2x), +- lrint(p2y) ); ++ l->setPoints( (long)rint (parPos.x()), ++ (long)rint(parPos.y()), ++ (long)rint(p2x), ++ (long)rint(p2y) ); + break; + case StyleParabel: + parabel (pa0, p1x,p1y,p2x,p2y); +@@ -492,15 +492,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 ((long)rint(p2x+tp.x()), (long)rint(p2y+tp.y())); ++ pa0[1]=QPoint ((long)rint(p2x-tp.x()), (long)rint(p2y-tp.y())); ++ pa0[2]=QPoint ((long)rint (parPos.x()), (long)rint(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( (long)rint (parPos.x()), ++ (long)rint(parPos.y()), ++ (long)rint(p2x), ++ (long)rint(p2y) ); + break; + case StylePolyParabel: + parabel (pa1, p1x,p1y,p2x+tp.x(),p2y+tp.y()); +@@ -680,12 +680,12 @@ m=(vy / (vx*vx)); + dx=vx/(arcsegs); + int i; +- ya.setPoint (0,QPoint (lrint(p1x),lrint(p1y))); ++ ya.setPoint (0,QPoint ((long)rint(p1x),(long)rint(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 ((long)rint(pnx),(long)rint(pny))); + p1x=pnx; + p1y=pny; + } diff --git a/deskutils/vym/files/patch-misc.cpp b/deskutils/vym/files/patch-misc.cpp index a829799337d6..f6718134dfd2 100644 --- a/deskutils/vym/files/patch-misc.cpp +++ b/deskutils/vym/files/patch-misc.cpp @@ -1,15 +1,18 @@ --- misc.cpp.orig Sun Sep 26 22:45:57 2004 -+++ misc.cpp Sun Oct 17 17:11:40 2004 -@@ -5,6 +5,12 @@ - - #include "misc.h" - -+#if !defined(HAVE_LRINTF) -+static inline long int lrint(double x) -+{ -+ return (long)(rint(x)); -+} -+#endif - - ostream &operator<< (ostream &stream, QPoint const &p) - { ++++ misc.cpp Sat Jan 15 12:30:23 2005 +@@ -223,13 +223,13 @@ + if (pix.width()>max_w) + { + r=max_w / pix.width(); +- pix.resize(lrint(pix.width()*r), lrint(pix.height()*r)); ++ pix.resize((long)rint(pix.width()*r), (long)rint(pix.height()*r)); + // TODO not a resize, but a shrink/enlarge is needed here... + } + if (pix.height()>max_h) + { + r=max_h / pix.height(); +- pix.resize(lrint(pix.width()*r), lrint(pix.height()*r)); ++ pix.resize((long)rint(pix.width()*r), (long)rint(pix.height()*r)); + // TODO not a resize, but a shrink/enlarge is needed here... + } + setPixmap( pix ); diff --git a/deskutils/vym/files/patch-xml.cpp b/deskutils/vym/files/patch-xml.cpp new file mode 100644 index 000000000000..503e5f424b8e --- /dev/null +++ b/deskutils/vym/files/patch-xml.cpp @@ -0,0 +1,10 @@ +--- xml.cpp.orig Mon Jan 17 12:50:32 2005 ++++ xml.cpp Mon Jan 17 12:50:42 2005 +@@ -4,6 +4,7 @@ + #include <qcolor.h> + #include <qstylesheet.h> + #include <iostream> ++#include <typeinfo> + + #include "misc.h" + #include "settings.h" |