#include "Point.h" #ifdef WIN32 # include "Screen.h" # include "Window.h" #endif using namespace Framework; // other functions #ifdef WIN32 inline Point Framework::ScreenSize(int mId) // Returns the screen size { Monitor m = getMonitor(mId); return Point(m.Width, m.height); } inline Point Framework::ScreenCenter(int mId) // Returns the screen center { Monitor m = getMonitor(mId); return Point(m.x + m.Width / 2, m.y + m.height / 2); } inline Point Framework::ScreenCenter( NativeWindow* f, int mId) // Returns the screen center { Point p = ScreenCenter(mId); Point p2 = f->getSize(); f->release(); return {p.x - p2.x / 2, p.y - p2.y / 2}; } #endif bool Framework::operator>( const Point& a, const Point& b) // Indicates whether a > b { return a.x > b.x && a.y > b.y; } bool Framework::operator<( const Point& a, const Point& b) // Indicates whether a < b { return a.x < b.x && a.y < b.y; } bool Framework::operator<=( const Point& a, const Point& b) // Indicates whether a <= b { return a.x <= b.x && a.y <= b.y; } bool Framework::operator>=( const Point& a, const Point& b) // Indicates whether a >= b { return a.x >= b.x && a.y >= b.y; }