X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/82cddbd97a4dfbd0dcf5c44c9336173d6dd386ef..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/dfb/pen.cpp diff --git a/src/dfb/pen.cpp b/src/dfb/pen.cpp index 7039406b52..f1b9f9d686 100644 --- a/src/dfb/pen.cpp +++ b/src/dfb/pen.cpp @@ -40,12 +40,12 @@ public: virtual bool IsOk() const { return m_colour.IsOk(); } - void SetStyle(int style) + void SetStyle(wxPenStyle style) { - if ( style != wxSOLID && style != wxTRANSPARENT ) + if ( style != wxPENSTYLE_SOLID && style != wxPENSTYLE_TRANSPARENT ) { wxFAIL_MSG( "only wxSOLID and wxTRANSPARENT styles are supported" ); - style = wxSOLID; + style = wxPENSTYLE_SOLID; } m_style = style; @@ -68,10 +68,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)) { @@ -153,7 +155,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 +163,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 +171,28 @@ wxPenJoin wxPen::GetJoin() const wxPenStyle wxPen::GetStyle() const { - wxCHECK_MSG( Ok(), -1, 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;