00001 #pragma ident "$Id: StrokeStyle.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_STROKESTYLE_H
00029 #define VDRAW_STROKESTYLE_H
00030
00031 #include<string>
00032 #include<list>
00033
00034 #include "Color.hpp"
00035
00036 namespace vdraw
00037 {
00040
00041
00046 class StrokeStyle {
00047
00048 public:
00049
00055 typedef std::list<double> dashLengthList;
00056
00060 StrokeStyle(void);
00061
00067 StrokeStyle( const Color& icolor,
00068 double iwidth=1 );
00069
00076 StrokeStyle( const Color& icolor,
00077 double iwidth,
00078 const dashLengthList& dll );
00079
00101 StrokeStyle(const std::string& strSpec) {}
00102
00104 static StrokeStyle clear() { return StrokeStyle(Color::CLEAR); };
00105
00107 bool operator==(const StrokeStyle& rhs) const
00108 { return ((color==rhs.color)&&(width==rhs.width)&&(dashList==rhs.dashList)); }
00109
00111 bool operator!=(const StrokeStyle& rhs) const
00112 { return !((*this)==rhs); }
00113
00115 Color getColor(void) const { return color; }
00116
00118 double getWidth(void) const { return width; }
00119
00121 bool getSolid(void) const { return solid; }
00122
00124 dashLengthList getDashList(void) const { return dashList; }
00125
00126 protected:
00127
00129 Color color;
00130
00132 double width;
00133
00135 bool solid;
00136
00138 dashLengthList dashList;
00139
00140 private:
00141
00142
00143 };
00144
00146
00147 }
00148
00149 #endif //VDRAW_STROKESTYLE_H
00150