X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad66316ffbcfd10a4fb448116371d27db3613d17..f897d9ed1a1d1c4cdce789ef0cd2963e199b4595:/src/osx/pen.cpp?ds=sidebyside diff --git a/src/osx/pen.cpp b/src/osx/pen.cpp index 260f1abc82..ec49069ed8 100644 --- a/src/osx/pen.cpp +++ b/src/osx/pen.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/pen.cpp +// Name: src/osx/pen.cpp // Purpose: wxPen // Author: Stefan Csomor // Modified by: @@ -151,7 +151,7 @@ wxGDIRefData *wxPen::CreateGDIRefData() const wxGDIRefData *wxPen::CloneGDIRefData(const wxGDIRefData *data) const { - return new wxPenRefData(*wx_static_cast(const wxPenRefData *, data)); + return new wxPenRefData(*static_cast(data)); } bool wxPen::operator==(const wxPen& pen) const @@ -164,50 +164,55 @@ bool wxPen::operator==(const wxPen& pen) const wxColour wxPen::GetColour() const { - wxCHECK_MSG( Ok(), wxNullColour, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid pen") ); return M_PENDATA->m_colour; } int wxPen::GetWidth() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), -1, wxT("invalid pen") ); return M_PENDATA->m_width; } wxPenStyle wxPen::GetStyle() const { - wxCHECK_MSG( Ok(), wxPENSTYLE_INVALID, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxPENSTYLE_INVALID, wxT("invalid pen") ); return M_PENDATA->m_style; } wxPenJoin wxPen::GetJoin() const { - wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxJOIN_INVALID, wxT("invalid pen") ); return M_PENDATA->m_join; } wxPenCap wxPen::GetCap() const { - wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), wxCAP_INVALID, wxT("invalid pen") ); return M_PENDATA->m_cap; } int wxPen::GetDashes(wxDash **ptr) const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), -1, wxT("invalid pen") ); *ptr = M_PENDATA->m_dash; return M_PENDATA->m_nbDash; } +int wxPen::GetDashCount() const +{ + return M_PENDATA->m_nbDash; +} + wxBitmap *wxPen::GetStipple() const { - wxCHECK_MSG( Ok(), NULL, wxT("invalid pen") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid pen") ); return &M_PENDATA->m_stipple; }