]>
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 | ||
b5dbe15d VS |
23 | class WXDLLIMPEXP_FWD_CORE wxBitmap; |
24 | class WXDLLIMPEXP_FWD_CORE wxPen; | |
32b8ec41 VZ |
25 | |
26 | //----------------------------------------------------------------------------- | |
27 | // wxPen | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
53a2db12 | 30 | class WXDLLIMPEXP_CORE wxPen : public wxPenBase |
32b8ec41 VZ |
31 | { |
32 | public: | |
3cdd0895 | 33 | wxPen() {} |
82cddbd9 | 34 | wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); |
ac3688c0 FM |
35 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
36 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
82cddbd9 FM |
37 | #endif |
38 | ||
32b8ec41 | 39 | wxPen(const wxBitmap& stipple, int width); |
d3c7fc99 | 40 | virtual ~wxPen() {} |
32b8ec41 VZ |
41 | bool operator == (const wxPen& pen) const; |
42 | bool operator != (const wxPen& pen) const; | |
43 | ||
44 | void SetColour(const wxColour &colour); | |
1a1498c0 | 45 | void SetColour(unsigned char red, unsigned char green, unsigned char blue); |
82cddbd9 FM |
46 | void SetCap(wxPenCap capStyle); |
47 | void SetJoin(wxPenJoin joinStyle); | |
48 | void SetStyle(wxPenStyle style); | |
32b8ec41 VZ |
49 | void SetWidth(int width); |
50 | void SetDashes(int number_of_dashes, const wxDash *dash); | |
51 | void SetStipple(const wxBitmap& stipple); | |
46562151 | 52 | |
231b9591 | 53 | wxColour GetColour() const; |
82cddbd9 FM |
54 | wxPenCap GetCap() const; |
55 | wxPenJoin GetJoin() const; | |
56 | wxPenStyle GetStyle() const; | |
32b8ec41 VZ |
57 | int GetWidth() const; |
58 | int GetDashes(wxDash **ptr) const; | |
59 | int GetDashCount() const; | |
60 | wxDash* GetDash() const; | |
61 | wxBitmap *GetStipple() const; | |
46562151 | 62 | |
bc735a68 VZ |
63 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
64 | wxDEPRECATED_FUTURE( void SetStyle(int style) ) | |
65 | { SetStyle((wxPenStyle)style); } | |
66 | #endif | |
67 | ||
32b8ec41 VZ |
68 | // implementation: |
69 | void* GetPixPattern() const; | |
70 | ||
6d7ee9e8 | 71 | protected: |
8f884a0d VZ |
72 | virtual wxGDIRefData *CreateGDIRefData() const; |
73 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
6d7ee9e8 | 74 | |
46562151 | 75 | private: |
32b8ec41 VZ |
76 | DECLARE_DYNAMIC_CLASS(wxPen) |
77 | }; | |
78 | ||
79 | #endif // __WX_PEN_H__ |