00001 #pragma ident "$Id: Rectangle.hpp 1644 2009-01-27 19:26:14Z ckiesch $"
00002
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef VDRAW_RECT_H
00029 #define VDRAW_RECT_H
00030
00031 #include "StrokeStyle.hpp"
00032 #include "Fillable.hpp"
00033
00034 namespace vdraw
00035 {
00038
00043 class Rectangle : public Fillable {
00044
00045 public:
00046
00048 double x1;
00049
00051 double y1;
00052
00054 double x2;
00055
00057 double y2;
00058
00066 Rectangle(double ix1, double iy1, double ix2, double iy2)
00067 : Fillable()
00068 { x1=ix1; y1=iy1; x2=ix2; y2=iy2; fixPoints(); };
00069
00079 Rectangle(double ix1, double iy1, double ix2, double iy2,
00080 const StrokeStyle& istyle)
00081 : Fillable(istyle)
00082 { x1=ix1; y1=iy1; x2=ix2; y2=iy2; fixPoints(); };
00083
00094 Rectangle(double ix1, double iy1, double ix2, double iy2,
00095 const StrokeStyle& istyle, const Color& ifillcolor)
00096 : Fillable(istyle,ifillcolor)
00097 { x1=ix1; y1=iy1; x2=ix2; y2=iy2; fixPoints(); };
00098
00108 Rectangle(double ix1, double iy1, double ix2, double iy2,
00109 const Color& ifillcolor)
00110 : Fillable(ifillcolor)
00111 { x1=ix1; y1=iy1; x2=ix2; y2=iy2; fixPoints(); };
00112
00113 protected:
00114
00115 private:
00116
00119 void fixPoints();
00120
00121 };
00122
00124
00125 }
00126
00127 #endif //VDRAW_RECT_H
00128
00129