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