SDL++
C++wrapperfortheSDLlibrary.
|
00001 00021 #ifndef SDL_MISC_RECT_H 00022 #define SDL_MISC_RECT_H 00023 00024 #include <boost/mpl/aux_/config/static_constant.hpp> 00025 00026 #include <SDL.h> 00027 00028 namespace sdl { 00029 namespace misc { 00034 class Rect { 00035 public: 00044 Rect (unsigned int height, unsigned int width, short x, short y) : rect_ () { 00045 rect_.w = width; 00046 rect_.h = height; 00047 rect_.x = x; 00048 rect_.y = y; 00049 }; 00050 00056 SDL_Rect* operator* () { return &rect_; }; 00057 00063 int height () const { return rect_.h; }; 00064 00070 int width () const { return rect_.w; }; 00071 00077 int x () const { return rect_.x; }; 00078 00084 int y () const { return rect_.y; }; 00085 00086 private: 00090 SDL_Rect rect_; 00091 }; //Rect 00092 }; //misc 00093 }; //sdl 00094 00095 #endif //SDL_MISC_RECT_H 00096