X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ed7ec76de3e7dc4ccd0271d14b37e1017cad0db9..dca2fe5daecf9c74f227062d8a9a259b4e5ef1fc:/src/dfb/pen.cpp diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index 15e685dc02..bec00cb7e5 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -3,7 +3,6 @@ // Purpose: wxPen class implementation // Author: Vaclav Slavik // Created: 2006-08-04 -// RCS-ID: $Id$ // Copyright: (c) 2006 REA Elektronik GmbH // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -40,7 +39,7 @@ public: virtual bool IsOk() const { return m_colour.IsOk(); } - void SetStyle(int style) + void SetStyle(wxPenStyle style) { if ( style != wxPENSTYLE_SOLID && style != wxPENSTYLE_TRANSPARENT ) { @@ -68,10 +67,12 @@ wxPen::wxPen(const wxColour &colour, int width, wxPenStyle style) m_refData = new wxPenRefData(colour, style); } -wxPen::wxPen(const wxColour& col, int width, wxBrushStyle style) +#if FUTURE_WXWIN_COMPATIBILITY_3_0 +wxPen::wxPen(const wxColour& col, int width, int style) { m_refData = new wxPenRefData(col, (wxPenStyle)style); } +#endif wxPen::wxPen(const wxBitmap& WXUNUSED(stipple), int WXUNUSED(width)) { @@ -82,7 +83,7 @@ wxPen::wxPen(const wxBitmap& WXUNUSED(stipple), int WXUNUSED(width)) bool wxPen::operator==(const wxPen& pen) const { -#warning "this is incorrect (MGL too)" +#warning "this is incorrect" return m_refData == pen.m_refData; } @@ -153,7 +154,7 @@ wxDash* wxPen::GetDash() const wxPenCap wxPen::GetCap() const { - wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxCAP_INVALID, wxT("invalid pen") ); wxFAIL_MSG( "GetCap not implemented" ); return wxCAP_INVALID; @@ -161,7 +162,7 @@ wxPenCap wxPen::GetCap() const wxPenJoin wxPen::GetJoin() const { - wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxJOIN_INVALID, wxT("invalid pen") ); wxFAIL_MSG( "GetJoin not implemented" ); return wxJOIN_INVALID; @@ -169,28 +170,28 @@ wxPenJoin wxPen::GetJoin() const wxPenStyle wxPen::GetStyle() const { - wxCHECK_MSG( Ok(), wxPENSTYLE_MAX, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxPENSTYLE_INVALID, wxT("invalid pen") ); return M_PENDATA->m_style; } int wxPen::GetWidth() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), -1, wxT("invalid pen") ); return 1; } -wxColour &wxPen::GetColour() const +wxColour wxPen::GetColour() const { - wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid pen") ); return M_PENDATA->m_colour; } wxBitmap *wxPen::GetStipple() const { - wxCHECK_MSG( Ok(), NULL, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid pen") ); wxFAIL_MSG( "GetStipple not implemented" ); return NULL;