00001
00002
00003
00004
00005 #ifndef __ORECT_H
00006 #define __ORECT_H
00007
00008
00009
00011 class Rect {
00012 public:
00013 short x1, y1, x2, y2;
00014
00015 public:
00016 Rect() {;}
00017 Rect(short x1,short y1,short x2,short y2);
00018
00019 void clip_me(Rect clipRect);
00020 bool is_inside(short x, short y);
00021 };
00022
00023
00024
00025 inline bool Rect::is_inside(short x, short y) {
00026 return ( x>=x1 && x<=x2 && y>=y1 && y<=y2 );
00027 }
00028
00029
00030 #endif