00001 #ifndef KDE__PEN_H
00002 #define KDE__PEN_H
00003
00004 #include <faith/color.h>
00005
00006 namespace Faith
00007 {
00008
00013 class FAITH_CORE_EXPORT Pen
00014 {
00015
00016 struct Private;
00017 Private *d;
00018
00019 public:
00020
00026 enum PenStyle
00027 {
00028 NoPen,
00029 SolidLine,
00030 DashLine,
00031 DotLine
00032 };
00033
00034
00038 Pen(const Color &color, int width=0, PenStyle style = SolidLine);
00039 Pen(const Pen ©);
00040 ~Pen();
00041
00045 Pen(PenStyle style = SolidLine);
00046
00050 Pen &operator = (const Pen ©);
00051
00055 bool operator ==(const Pen &other) const;
00056
00057 bool operator !=(const Pen &other) const { return !operator==(other); }
00058
00063 int width() const;
00064
00068 void setWidth(int width);
00069
00074 Color color() const;
00078 void setColor(const Color &color);
00082 void setColor(int r, int g, int b)
00083 { setColor(Faith::Color(r,g,b)); }
00084
00088 PenStyle style() const;
00089
00094 void setStyle(PenStyle style);
00095 };
00096
00097
00098 }
00099
00100 #endif
00101