]>
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 WXDLLEXPORT wxPen
: public wxGDIObject
24 wxPen(const wxColour
& col
, int width
= 1, int style
= wxSOLID
);
25 wxPen(const wxBitmap
& stipple
, int width
);
28 bool operator==(const wxPen
& pen
) const;
29 bool operator!=(const wxPen
& pen
) const { return !(*this == pen
); }
31 // Override in order to recreate the pen
32 void SetColour(const wxColour
& col
) ;
33 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
35 void SetWidth(int width
) ;
36 void SetStyle(int style
) ;
37 void SetStipple(const wxBitmap
& stipple
) ;
38 void SetDashes(int nb_dashes
, const wxDash
*dash
) ;
39 void SetJoin(int join
) ;
40 void SetCap(int cap
) ;
42 wxColour
& GetColour() const ;
47 int GetDashes(wxDash
**ptr
) const;
49 wxBitmap
*GetStipple() const ;
53 // Useful helper: create the brush resource
54 bool RealizeResource();
57 virtual wxGDIRefData
*CreateGDIRefData() const;
58 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
63 DECLARE_DYNAMIC_CLASS(wxPen
)