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"
19 class WXDLLIMPEXP_FWD_CORE wxPen
;
22 class WXDLLEXPORT wxPen
: public wxGDIObject
24 DECLARE_DYNAMIC_CLASS(wxPen
)
27 wxPen(const wxColour
& col
, int width
= 1, int style
= wxSOLID
);
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(int style
) ;
40 void SetStipple(const wxBitmap
& stipple
) ;
41 void SetDashes(int nb_dashes
, const wxDash
*dash
) ;
42 void SetJoin(int join
) ;
43 void SetCap(int cap
) ;
45 wxColour
& GetColour() const ;
50 int GetDashes(wxDash
**ptr
) const;
52 wxBitmap
*GetStipple() const ;
56 // Useful helper: create the brush resource
57 bool RealizeResource();