]>
Commit | Line | Data |
---|---|---|
32b8ec41 | 1 | ///////////////////////////////////////////////////////////////////////////// |
4f535231 | 2 | // Name: wx/mgl/pen.h |
32b8ec41 VZ |
3 | // Purpose: |
4 | // Author: Vaclav Slavik | |
5 | // Id: $Id$ | |
52750c2e | 6 | // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) |
65571936 | 7 | // Licence: wxWindows licence |
32b8ec41 VZ |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
32b8ec41 VZ |
10 | #ifndef __WX_PEN_H__ |
11 | #define __WX_PEN_H__ | |
12 | ||
32b8ec41 VZ |
13 | #include "wx/defs.h" |
14 | #include "wx/object.h" | |
15 | #include "wx/string.h" | |
16 | #include "wx/gdiobj.h" | |
17 | #include "wx/gdicmn.h" | |
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // classes | |
21 | //----------------------------------------------------------------------------- | |
22 | ||
23 | class WXDLLEXPORT wxBitmap; | |
24 | class WXDLLEXPORT wxPen; | |
25 | ||
26 | //----------------------------------------------------------------------------- | |
27 | // wxPen | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
30 | class WXDLLEXPORT wxPen: public wxGDIObject | |
31 | { | |
32 | public: | |
3cdd0895 | 33 | wxPen() {} |
4f535231 | 34 | wxPen(const wxColour &colour, int width = 1, int style = wxSOLID); |
32b8ec41 VZ |
35 | wxPen(const wxBitmap& stipple, int width); |
36 | wxPen(const wxPen& pen); | |
3cdd0895 | 37 | ~wxPen() {} |
32b8ec41 VZ |
38 | wxPen& operator = (const wxPen& pen); |
39 | bool operator == (const wxPen& pen) const; | |
40 | bool operator != (const wxPen& pen) const; | |
41 | ||
42 | void SetColour(const wxColour &colour); | |
1a1498c0 | 43 | void SetColour(unsigned char red, unsigned char green, unsigned char blue); |
32b8ec41 VZ |
44 | void SetCap(int capStyle); |
45 | void SetJoin(int joinStyle); | |
46 | void SetStyle(int style); | |
47 | void SetWidth(int width); | |
48 | void SetDashes(int number_of_dashes, const wxDash *dash); | |
49 | void SetStipple(const wxBitmap& stipple); | |
46562151 | 50 | |
32b8ec41 VZ |
51 | wxColour &GetColour() const; |
52 | int GetCap() const; | |
53 | int GetJoin() const; | |
54 | int GetStyle() const; | |
55 | int GetWidth() const; | |
56 | int GetDashes(wxDash **ptr) const; | |
57 | int GetDashCount() const; | |
58 | wxDash* GetDash() const; | |
59 | wxBitmap *GetStipple() const; | |
46562151 | 60 | |
32b8ec41 VZ |
61 | bool Ok() const; |
62 | ||
32b8ec41 VZ |
63 | // implementation: |
64 | void* GetPixPattern() const; | |
65 | ||
6d7ee9e8 VS |
66 | protected: |
67 | // ref counting code | |
68 | virtual wxObjectRefData *CreateRefData() const; | |
69 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
70 | ||
46562151 | 71 | private: |
32b8ec41 VZ |
72 | DECLARE_DYNAMIC_CLASS(wxPen) |
73 | }; | |
74 | ||
75 | #endif // __WX_PEN_H__ |