]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/pen.h
243714ac7e1e33bb88f2a4abffec8ce9755342ce
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/colour.h"
17 #include "wx/bitmap.h"
20 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
24 wxPen(const wxColour
& col
, int width
= 1, wxPenStyle style
= wxPENSTYLE_SOLID
);
25 #if FUTURE_WXWIN_COMPATIBILITY_3_0
26 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
29 wxPen(const wxBitmap
& stipple
, int width
);
32 bool operator==(const wxPen
& pen
) const;
33 bool operator!=(const wxPen
& pen
) const { return !(*this == pen
); }
35 // Override in order to recreate the pen
36 void SetColour(const wxColour
& col
) ;
37 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
39 void SetWidth(int width
) ;
40 void SetStyle(wxPenStyle style
) ;
41 void SetStipple(const wxBitmap
& stipple
) ;
42 void SetDashes(int nb_dashes
, const wxDash
*dash
) ;
43 void SetJoin(wxPenJoin join
) ;
44 void SetCap(wxPenCap cap
) ;
46 wxColour
GetColour() const ;
48 wxPenStyle
GetStyle() const;
49 wxPenJoin
GetJoin() const;
50 wxPenCap
GetCap() const;
51 int GetDashes(wxDash
**ptr
) const;
52 int GetDashCount() const;
54 wxBitmap
*GetStipple() const ;
56 #if FUTURE_WXWIN_COMPATIBILITY_3_0
57 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
58 { SetStyle((wxPenStyle
)style
); }
63 // Useful helper: create the brush resource
64 bool RealizeResource();
67 virtual wxGDIRefData
*CreateGDIRefData() const;
68 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
73 DECLARE_DYNAMIC_CLASS(wxPen
)