2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-07-21 15:39:34 -04:00
|
|
|
// Name: wx/mgl/pen.h
|
2001-06-26 17:05:06 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Id: $Id$
|
2002-02-14 15:30:34 -05:00
|
|
|
// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 17:05:06 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __WX_PEN_H__
|
|
|
|
#define __WX_PEN_H__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/string.h"
|
|
|
|
#include "wx/gdiobj.h"
|
|
|
|
#include "wx/gdicmn.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxBitmap;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPen;
|
2001-06-26 17:05:06 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxPen
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPen : public wxPenBase
|
2001-06-26 17:05:06 -04:00
|
|
|
{
|
|
|
|
public:
|
2001-11-20 19:00:29 -05:00
|
|
|
wxPen() {}
|
2008-03-16 17:11:12 -04:00
|
|
|
wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
|
2008-03-20 11:08:51 -04:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
|
2008-03-16 17:11:12 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
wxPen(const wxBitmap& stipple, int width);
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxPen() {}
|
2001-06-26 17:05:06 -04:00
|
|
|
bool operator == (const wxPen& pen) const;
|
|
|
|
bool operator != (const wxPen& pen) const;
|
|
|
|
|
|
|
|
void SetColour(const wxColour &colour);
|
2005-10-04 14:14:41 -04:00
|
|
|
void SetColour(unsigned char red, unsigned char green, unsigned char blue);
|
2008-03-16 17:11:12 -04:00
|
|
|
void SetCap(wxPenCap capStyle);
|
|
|
|
void SetJoin(wxPenJoin joinStyle);
|
|
|
|
void SetStyle(wxPenStyle style);
|
2001-06-26 17:05:06 -04:00
|
|
|
void SetWidth(int width);
|
|
|
|
void SetDashes(int number_of_dashes, const wxDash *dash);
|
|
|
|
void SetStipple(const wxBitmap& stipple);
|
2005-10-04 12:13:42 -04:00
|
|
|
|
2008-03-28 12:47:58 -04:00
|
|
|
wxColour GetColour() const;
|
2008-03-16 17:11:12 -04:00
|
|
|
wxPenCap GetCap() const;
|
|
|
|
wxPenJoin GetJoin() const;
|
|
|
|
wxPenStyle GetStyle() const;
|
2001-06-26 17:05:06 -04:00
|
|
|
int GetWidth() const;
|
|
|
|
int GetDashes(wxDash **ptr) const;
|
|
|
|
int GetDashCount() const;
|
|
|
|
wxDash* GetDash() const;
|
|
|
|
wxBitmap *GetStipple() const;
|
2005-10-04 12:13:42 -04:00
|
|
|
|
2008-06-17 13:28:26 -04:00
|
|
|
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
|
|
|
wxDEPRECATED_FUTURE( void SetStyle(int style) )
|
|
|
|
{ SetStyle((wxPenStyle)style); }
|
|
|
|
#endif
|
|
|
|
|
2001-06-26 17:05:06 -04:00
|
|
|
// implementation:
|
|
|
|
void* GetPixPattern() const;
|
|
|
|
|
2002-02-09 18:29:05 -05:00
|
|
|
protected:
|
2007-12-15 12:54:20 -05:00
|
|
|
virtual wxGDIRefData *CreateGDIRefData() const;
|
|
|
|
virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
|
2002-02-09 18:29:05 -05:00
|
|
|
|
2005-10-04 12:13:42 -04:00
|
|
|
private:
|
2001-06-26 17:05:06 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPen)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __WX_PEN_H__
|