#include "Punkt.h" #ifdef WIN32 #include "Bildschirm.h" #include "Fenster.h" #endif using namespace Framework; // andere Funktionen #ifdef WIN32 inline Punkt Framework::BildschirmGröße( int mId ) // Gibt die Größe des Bildschirms zurück { Monitor m = getMonitor( mId ); return Punkt( m.x, m.y ); } inline Punkt Framework::Bildschirmmitte( int mId ) // Giebt die Mitte des Bildschirms zurück { Monitor m = getMonitor( mId ); return Punkt( m.x + m.breite / 2, m.y + m.height / 2 ); } inline Punkt Framework::Bildschirmmitte( WFenster *f, int mId ) // Giebt die Mitte des Bildschirms zurück { Punkt p = Bildschirmmitte( mId ); Punkt p2 = f->getGröße(); f->release(); return{ p.x - p2.x / 2, p.y - p2.y / 2 }; } #endif bool Framework::operator >( const Punkt &a, const Punkt &b ) // Gibt an, ob a > als b ist { return a.x > b.x && a.y > b.y; } bool Framework::operator <( const Punkt &a, const Punkt &b ) // Gibt an, ob a < als b ist { return a.x < b.x && a.y < b.y; } bool Framework::operator <=( const Punkt &a, const Punkt &b ) // Gibt an, ob a <= als b ist { return a.x <= b.x && a.y <= b.y; } bool Framework::operator >=( const Punkt &a, const Punkt &b ) // Gibt an, ob a >= als b ist { return a.x >= b.x && a.y >= b.y; }