X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f884a0dccd6b642f35c441ac9bfc87a6d5b4d35..edd6813c826edc2311548da53eb83e7f1bc18d2b:/src/x11/pen.cpp diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index 079472dbdf..31e4087bc2 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -30,7 +30,7 @@ public: wxPenRefData() { m_width = 1; - m_style = wxSOLID; + m_style = wxPENSTYLE_SOLID; m_joinStyle = wxJOIN_ROUND; m_capStyle = wxCAP_ROUND; m_dash = (wxX11Dash*) NULL; @@ -63,9 +63,9 @@ public: } int m_width; - int m_style; - int m_joinStyle; - int m_capStyle; + wxPenStyle m_style; + wxPenJoin m_joinStyle; + wxPenCap m_capStyle; wxColour m_colour; int m_countDashes; wxBitmap m_stipple; @@ -78,7 +78,7 @@ public: IMPLEMENT_DYNAMIC_CLASS(wxPen,wxGDIObject) -wxPen::wxPen( const wxColour &colour, int width, int style ) +wxPen::wxPen( const wxColour &colour, int width, wxPenStyle style ) { m_refData = new wxPenRefData(); M_PENDATA->m_width = width; @@ -86,6 +86,14 @@ wxPen::wxPen( const wxColour &colour, int width, int style ) M_PENDATA->m_colour = colour; } +wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style) +{ + m_refData = new wxPenRefData(); + M_PENDATA->m_width = width; + M_PENDATA->m_style = (wxPenStyle)style; + M_PENDATA->m_colour = colour; +} + wxPen::~wxPen() { // m_refData unrefed in ~wxObject @@ -132,14 +140,14 @@ void wxPen::SetColour( unsigned char red, unsigned char green, unsigned char blu M_PENDATA->m_colour.Set( red, green, blue ); } -void wxPen::SetCap( int capStyle ) +void wxPen::SetCap( wxPenCap capStyle ) { AllocExclusive(); M_PENDATA->m_capStyle = capStyle; } -void wxPen::SetJoin( int joinStyle ) +void wxPen::SetJoin( wxPenJoin joinStyle ) { AllocExclusive(); @@ -153,7 +161,7 @@ void wxPen::SetStipple( wxBitmap *stipple ) M_PENDATA->m_stipple = *stipple; } -void wxPen::SetStyle( int style ) +void wxPen::SetStyle( wxPenStyle style ) { AllocExclusive(); @@ -183,21 +191,21 @@ wxDash* wxPen::GetDash() const return (wxDash*)M_PENDATA->m_dash; } -int wxPen::GetCap() const +wxPenCap wxPen::GetCap() const { wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); return M_PENDATA->m_capStyle; } -int wxPen::GetJoin() const +wxPenJoin wxPen::GetJoin() const { wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); return M_PENDATA->m_joinStyle; } -int wxPen::GetStyle() const +wxPenStyle wxPen::GetStyle() const { wxCHECK_MSG( Ok(), -1, wxT("invalid pen") );