diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-01-09 16:29:34 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-01-09 16:29:34 +0000 |
| commit | ba02fb4aced5868d047a5bffbd2ed87583daee4d (patch) | |
| tree | bcfea66b1f7fd2212539a99abc074de1424ac9a0 /lib/gdi/epoint.h | |
| parent | 2494509cd031727d92c6556089c99711d16d8af9 (diff) | |
| download | enigma2-ba02fb4aced5868d047a5bffbd2ed87583daee4d.tar.gz enigma2-ba02fb4aced5868d047a5bffbd2ed87583daee4d.zip | |
- add more python stuff
- fix some gui/gdi
- add eslider
- improve windowstyle
Diffstat (limited to 'lib/gdi/epoint.h')
| -rw-r--r-- | lib/gdi/epoint.h | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/lib/gdi/epoint.h b/lib/gdi/epoint.h index fc5f9836..d7cdf399 100644 --- a/lib/gdi/epoint.h +++ b/lib/gdi/epoint.h @@ -1,8 +1,6 @@ #ifndef EPOINT_H #define EPOINT_H -#include <iostream> - #ifndef ABS #define ABS(x) ( x>0 ? x : -x ) #endif @@ -35,7 +33,9 @@ public: friend inline bool operator==( const ePoint &, const ePoint & ); friend inline bool operator!=( const ePoint &, const ePoint & ); friend inline ePoint operator+( const ePoint &, const ePoint & ); + friend inline ePoint operator+( const ePoint &, const eSize & ); friend inline ePoint operator-( const ePoint &, const ePoint & ); + friend inline ePoint operator-( const ePoint &, const eSize & ); friend inline ePoint operator*( const ePoint &, int ); friend inline ePoint operator*( int, const ePoint & ); friend inline ePoint operator*( const ePoint &, double ); @@ -56,25 +56,6 @@ inline int ePoint::manhattanLength() const /***************************************************************************** - ePoint stream functions - *****************************************************************************/ -namespace std -{ - inline ostream &operator<<( ostream & s, const ePoint & p ) - { - s << p.x() << p.y(); - return s; - } - - inline istream &operator>>( istream & s, ePoint & p ) - { - s >> p.rx() >> p.ry(); - return s; - } -} - - -/***************************************************************************** ePoint inline functions *****************************************************************************/ @@ -129,6 +110,12 @@ inline ePoint operator+( const ePoint &p1, const ePoint &p2 ) inline ePoint operator-( const ePoint &p1, const ePoint &p2 ) { return ePoint(p1.xp-p2.xp, p1.yp-p2.yp); } +inline ePoint operator+( const ePoint &p1, const eSize &p2 ) +{ return ePoint(p1.xp+p2.width(), p1.yp+p2.height()); } + +inline ePoint operator-( const ePoint &p1, const eSize &p2 ) +{ return ePoint(p1.xp-p2.width(), p1.yp-p2.height()); } + inline ePoint operator*( const ePoint &p, int c ) { return ePoint(p.xp*c, p.yp*c); } |
