]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/pen.h
a5ae6095e3b2736921af0bae61d90fd05c7da2e1
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mac/carbon/pen.h
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;
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
)