1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class WXDLLIMPEXP_FWD_CORE wxPen
;
23 class WXDLLIMPEXP_FWD_CORE wxColour
;
24 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
26 typedef char wxX11Dash
;
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
37 wxPen( const wxColour
&colour
, int width
= 1, wxPenStyle style
= wxPENSTYLE_SOLID
);
38 #if WXWIN_COMPATIBILITY_2_8
39 wxDEPRECATED( wxPen(const wxColour
& col
, int width
, wxBrushStyle style
) );
42 wxPen( const wxBitmap
&stipple
, int width
);
45 bool operator == ( const wxPen
& pen
) const;
46 bool operator != (const wxPen
& pen
) const { return !(*this == pen
); }
48 void SetColour( const wxColour
&colour
);
49 void SetColour( unsigned char red
, unsigned char green
, unsigned char blue
);
50 void SetCap( wxPenCap capStyle
);
51 void SetJoin( wxPenJoin joinStyle
);
52 void SetStyle( wxPenStyle style
);
53 void SetWidth( int width
);
54 void SetDashes( int number_of_dashes
, const wxDash
*dash
);
55 void SetStipple( wxBitmap
*stipple
);
57 wxColour
&GetColour() const;
58 wxPenCap
GetCap() const;
59 wxPenJoin
GetJoin() const;
60 wxPenStyle
GetStyle() const;
62 int GetDashes(wxDash
**ptr
) const;
63 int GetDashCount() const;
64 wxDash
* GetDash() const;
65 wxBitmap
* GetStipple() const;
68 virtual wxGDIRefData
*CreateGDIRefData() const;
69 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
71 DECLARE_DYNAMIC_CLASS(wxPen
)