00001 #ifndef SCREEN_RECTANGLE_CLASS
00002 #define SCREEN_RECTANGLE_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "geometric_dll.h"
00019 #include "rectangle.h"
00020
00021 #ifdef __WIN32__
00022
00023 struct tagPOINT; struct tagRECT;
00024 #endif
00025
00026 namespace geometric {
00027
00028
00029 class double_angle;
00030
00032
00033 class GEOMETRIC_CLASS_STYLE screen_point : public point<int>
00034 {
00035 public:
00036 screen_point(int x = 0, int y = 0) : point<int>(x, y) {}
00037 screen_point(int r, double_angle theta) : point<int>(r, theta) {}
00038 screen_point(const point<int> &original) : point<int>(original) {}
00039 IMPLEMENT_CLASS_NAME("screen_point");
00040
00041 #ifdef __WIN32__
00042 screen_point(const tagPOINT &original);
00044 operator tagPOINT();
00046 #endif
00047 };
00048
00049 const screen_point GEOMETRIC_FUNCTION_STYLE &screen_origin();
00051
00053
00055
00061 class GEOMETRIC_CLASS_STYLE screen_rectangle : public rectangle<int>
00062 {
00063 public:
00064 screen_rectangle(const screen_point &vertex_1, const screen_point &vertex_2);
00065 screen_rectangle(int x_1 = 0, int y_1 = 0, int x_2 = 0, int y_2 = 0);
00066 screen_rectangle(const rectangle<int> &init);
00067
00068 screen_rectangle order() const;
00070
00073 screen_point top_left() const;
00074 screen_point bottom_left() const;
00075 screen_point top_right() const;
00076 screen_point bottom_right() const;
00077
00078 int left() const { return top_left().x(); }
00079 int top() const { return top_left().y(); }
00080 int right() const { return bottom_right().x(); }
00081 int bottom() const { return bottom_right().y(); }
00082
00083 #ifdef __WIN32__
00084 screen_rectangle(const tagRECT &original);
00086 operator tagRECT() const;
00088 #endif
00089 };
00090
00091 }
00092
00093 #endif
00094