Mass++ Common Libraries v2.7.5
 All Classes Namespaces Files Functions Variables Enumerations Macros
Rect.h
Go to the documentation of this file.
1 
11 #ifndef __KOME_CORE_RECT_H__
12 #define __KOME_CORE_RECT_H__
13 
14 namespace kome {
15  namespace core {
20  template <typename T> class Rect {
21  public:
26  Rect() : left(), top(), right(), bottom() {
27  }
28 
37  Rect( T& l, T& t, T& r, T& b ) : left( l ), top( t ), right( r ), bottom( b ) {
38  }
39 
44  virtual ~Rect() {
45  }
46 
47  public:
49  T left;
51  T top;
53  T right;
55  T bottom;
56 
57  public:
63  T getWidth() {
64  return RANGE( left, right );
65  }
66 
72  T getHeight() {
73  return RANGE( top, bottom );
74  }
75  };
76  }
77 }
78 
79 #endif // __KOME_CORE_RECT_H__
T getHeight()
gets height of rectangle
Definition: Rect.h:72
Rect(T &l, T &t, T &r, T &b)
constructor
Definition: Rect.h:37
#define RANGE(x, y)
Definition: CoreMacros.h:40
virtual ~Rect()
destructor
Definition: Rect.h:44
T getWidth()
gets width of rectangle
Definition: Rect.h:63
rectangle management class
Definition: Rect.h:20
Rect()
constructor
Definition: Rect.h:26