1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/gdicmn.h"
15 #include "wx/gdiobj.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_FWD_CORE wxPen
;
22 class WXDLLIMPEXP_FWD_CORE wxColour
;
23 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
25 typedef char wxX11Dash
;
27 //-----------------------------------------------------------------------------
29 //-----------------------------------------------------------------------------
31 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
36 wxPen( const wxColour
&colour
, int width
= 1, wxPenStyle style
= wxPENSTYLE_SOLID
);
37 #if FUTURE_WXWIN_COMPATIBILITY_3_0
38 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
41 wxPen( const wxBitmap
&stipple
, int width
);
44 bool operator == ( const wxPen
& pen
) const;
45 bool operator != (const wxPen
& pen
) const { return !(*this == pen
); }
47 void SetColour( const wxColour
&colour
);
48 void SetColour( unsigned char red
, unsigned char green
, unsigned char blue
);
49 void SetCap( wxPenCap capStyle
);
50 void SetJoin( wxPenJoin joinStyle
);
51 void SetStyle( wxPenStyle style
);
52 void SetWidth( int width
);
53 void SetDashes( int number_of_dashes
, const wxDash
*dash
);
54 void SetStipple( const wxBitmap
& stipple
);
56 wxColour
GetColour() const;
57 wxPenCap
GetCap() const;
58 wxPenJoin
GetJoin() const;
59 wxPenStyle
GetStyle() const;
61 int GetDashes(wxDash
**ptr
) const;
62 int GetDashCount() const;
63 wxDash
* GetDash() const;
64 wxBitmap
* GetStipple() const;
66 #if FUTURE_WXWIN_COMPATIBILITY_3_0
67 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
68 { SetStyle((wxPenStyle
)style
); }
72 virtual wxGDIRefData
*CreateGDIRefData() const;
73 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
75 DECLARE_DYNAMIC_CLASS(wxPen
)