]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/pen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "pen.h"
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
30 typedef char wxX11Dash
;
32 //-----------------------------------------------------------------------------
34 //-----------------------------------------------------------------------------
36 class wxPen
: public wxGDIObject
41 wxPen( const wxColour
&colour
, int width
= 1, int style
= wxSOLID
);
42 wxPen( const wxBitmap
&stipple
, int width
);
45 wxPen( const wxPen
& pen
) { Ref(pen
); }
46 wxPen
& operator = ( const wxPen
& pen
) { Ref(pen
); return *this; }
48 bool Ok() const { return m_refData
!= NULL
; }
50 bool operator == ( const wxPen
& pen
) const;
51 bool operator != (const wxPen
& pen
) const { return !(*this == pen
); }
53 void SetColour( const wxColour
&colour
);
54 void SetColour( int red
, int green
, int blue
);
55 void SetCap( int capStyle
);
56 void SetJoin( int joinStyle
);
57 void SetStyle( int style
);
58 void SetWidth( int width
);
59 void SetDashes( int number_of_dashes
, const wxDash
*dash
);
60 void SetStipple( wxBitmap
*stipple
);
62 wxColour
&GetColour() const;
67 int GetDashes(wxDash
**ptr
) const;
68 int GetDashCount() const;
69 wxDash
* GetDash() const;
70 wxBitmap
* GetStipple() const;
74 virtual wxObjectRefData
*CreateRefData() const;
75 virtual wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
77 DECLARE_DYNAMIC_CLASS(wxPen
)