| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #ifndef Punkt_H
- #define Punkt_H
- //---Include---
- #include "Vec2.h"
- namespace Framework
- {
- //! required includes
- class WFenster; //! from Fenster.h
- typedef Vec2<int>
- Punkt; //! Stores the integer coordinates of a point
- #ifdef WIN32
- //! Returns the size of the screen
- DLLEXPORT Punkt BildschirmGroesse(int mId = 0);
- //! Returns the center of the screen
- DLLEXPORT Punkt Bildschirmmitte(int mId = 0);
- //! Returns a point that can be used as a window position
- //! to center the window \param f The window to center
- DLLEXPORT Punkt Bildschirmmitte(WFenster* f, int mId = 0);
- #endif
- //! Checks whether a point is further to the bottom-right than another
- //! \return (true) if the left point is further right and further down.
- //! (false) otherwise
- DLLEXPORT bool operator>(const Punkt& a, const Punkt& b);
- //! Checks whether a point is further to the top-left than another
- //! \return (true) if the left point is further left and further up.
- //! (false) otherwise
- DLLEXPORT bool operator<(const Punkt& a, const Punkt& b);
- //! Checks whether a point is further to the top-left than another
- //! \return (true) if the left point is further left and further up or
- //! equal. (false) otherwise
- DLLEXPORT inline bool operator<=(const Punkt& a, const Punkt& b);
- //! Checks whether a point is further to the bottom-right than another
- //! \return (true) if the left point is further right and further down or
- //! equal. (false) otherwise
- DLLEXPORT inline bool operator>=(const Punkt& a, const Punkt& b);
- } // namespace Framework
- #endif
|