]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/pen.h
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 ;
57 // Useful helper: create the brush resource
58 bool RealizeResource();
61 virtual wxGDIRefData
*CreateGDIRefData() const;
62 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
67 DECLARE_DYNAMIC_CLASS(wxPen
)