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 wxGDIObject
37 wxPen( const wxColour
&colour
, int width
= 1, int style
= wxSOLID
);
38 wxPen( const wxBitmap
&stipple
, int width
);
41 bool Ok() const { return IsOk(); }
42 bool IsOk() const { return m_refData
!= NULL
; }
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( int capStyle
);
50 void SetJoin( int joinStyle
);
51 void SetStyle( int style
);
52 void SetWidth( int width
);
53 void SetDashes( int number_of_dashes
, const wxDash
*dash
);
54 void SetStipple( wxBitmap
*stipple
);
56 wxColour
&GetColour() const;
61 int GetDashes(wxDash
**ptr
) const;
62 int GetDashCount() const;
63 wxDash
* GetDash() const;
64 wxBitmap
* GetStipple() const;
68 virtual wxObjectRefData
*CreateRefData() const;
69 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
71 DECLARE_DYNAMIC_CLASS(wxPen
)