Point.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef Punkt_H
  2. #define Punkt_H
  3. //---Include---
  4. #include "Vec2.h"
  5. namespace Framework
  6. {
  7. //! required includes
  8. class NativeWindow; //! from Window.h
  9. typedef Vec2<int>
  10. Punkt; //! Stores the integer coordinates of a point
  11. #ifdef WIN32
  12. //! Returns the size of the screen
  13. DLLEXPORT Punkt ScreenSize(int mId = 0);
  14. //! Returns the center of the screen
  15. DLLEXPORT Punkt ScreenCenter(int mId = 0);
  16. //! Returns a point that can be used as a window position
  17. //! to center the window \param f The window to center
  18. DLLEXPORT Punkt ScreenCenter(NativeWindow* f, int mId = 0);
  19. #endif
  20. //! Checks whether a point is further to the bottom-right than another
  21. //! \return (true) if the left point is further right and further down.
  22. //! (false) otherwise
  23. DLLEXPORT bool operator>(const Punkt& a, const Punkt& b);
  24. //! Checks whether a point is further to the top-left than another
  25. //! \return (true) if the left point is further left and further up.
  26. //! (false) otherwise
  27. DLLEXPORT bool operator<(const Punkt& a, const Punkt& b);
  28. //! Checks whether a point is further to the top-left than another
  29. //! \return (true) if the left point is further left and further up or
  30. //! equal. (false) otherwise
  31. DLLEXPORT inline bool operator<=(const Punkt& a, const Punkt& b);
  32. //! Checks whether a point is further to the bottom-right than another
  33. //! \return (true) if the left point is further right and further down or
  34. //! equal. (false) otherwise
  35. DLLEXPORT inline bool operator>=(const Punkt& a, const Punkt& b);
  36. } // namespace Framework
  37. #endif