]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mgl/pen.h
Open Watcom correction
[wxWidgets.git] / include / wx / mgl / pen.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mgl/pen.h
3// Purpose:
4// Author: Vaclav Slavik
5// Id: $Id$
6// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __WX_PEN_H__
12#define __WX_PEN_H__
13
14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
15#pragma interface "pen.h"
16#endif
17
18#include "wx/defs.h"
19#include "wx/object.h"
20#include "wx/string.h"
21#include "wx/gdiobj.h"
22#include "wx/gdicmn.h"
23
24//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
28class WXDLLEXPORT wxBitmap;
29class WXDLLEXPORT wxPen;
30
31//-----------------------------------------------------------------------------
32// wxPen
33//-----------------------------------------------------------------------------
34
35class WXDLLEXPORT wxPen: public wxGDIObject
36{
37public:
38 wxPen() {}
39 wxPen(const wxColour &colour, int width = 1, int style = wxSOLID);
40 wxPen(const wxBitmap& stipple, int width);
41 wxPen(const wxPen& pen);
42 ~wxPen() {}
43 wxPen& operator = (const wxPen& pen);
44 bool operator == (const wxPen& pen) const;
45 bool operator != (const wxPen& pen) const;
46
47 void SetColour(const wxColour &colour);
48 void SetColour(int red, int green, int blue);
49 void SetCap(int capStyle);
50 void SetJoin(int joinStyle);
51 void SetStyle(int style);
52 void SetWidth(int width);
53 void SetDashes(int number_of_dashes, const wxDash *dash);
54 void SetStipple(const wxBitmap& stipple);
55
56 wxColour &GetColour() const;
57 int GetCap() const;
58 int GetJoin() const;
59 int GetStyle() const;
60 int GetWidth() const;
61 int GetDashes(wxDash **ptr) const;
62 int GetDashCount() const;
63 wxDash* GetDash() const;
64 wxBitmap *GetStipple() const;
65
66 bool Ok() const;
67
68 // implementation:
69 void* GetPixPattern() const;
70
71protected:
72 // ref counting code
73 virtual wxObjectRefData *CreateRefData() const;
74 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
75
76private:
77 DECLARE_DYNAMIC_CLASS(wxPen)
78};
79
80#endif // __WX_PEN_H__