From 2051c39fae88ff7a1cb964d7204cfa3356d4cbc5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Mar 2008 23:39:11 +0000 Subject: [PATCH] compilation fixes after pen/brush styles changes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/x11/pen.h | 2 +- src/x11/brush.cpp | 16 ++++++---------- src/x11/pen.cpp | 10 +++++----- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/include/wx/x11/pen.h b/include/wx/x11/pen.h index df8b0b67cf..fd2e6ad4db 100644 --- a/include/wx/x11/pen.h +++ b/include/wx/x11/pen.h @@ -52,7 +52,7 @@ public: void SetStyle( wxPenStyle style ); void SetWidth( int width ); void SetDashes( int number_of_dashes, const wxDash *dash ); - void SetStipple( wxBitmap *stipple ); + void SetStipple( const wxBitmap& stipple ); wxColour &GetColour() const; wxPenCap GetCap() const; diff --git a/src/x11/brush.cpp b/src/x11/brush.cpp index e2628de2b3..f3a0ecd8cb 100644 --- a/src/x11/brush.cpp +++ b/src/x11/brush.cpp @@ -29,7 +29,7 @@ class wxBrushRefData : public wxGDIRefData public: wxBrushRefData() { - m_style = 0; + m_style = wxBRUSHSTYLE_INVALID; } wxBrushRefData( const wxBrushRefData& data ) @@ -69,7 +69,7 @@ wxBrush::wxBrush(const wxColour& col, int style) { m_refData = new wxBrushRefData; M_BRUSHDATA->m_style = (wxBrushStyle)style; - M_BRUSHDATA->m_colour = colour; + M_BRUSHDATA->m_colour = col; } #endif @@ -81,9 +81,9 @@ wxBrush::wxBrush( const wxBitmap &stippleBitmap ) M_BRUSHDATA->m_stipple = stippleBitmap; if (M_BRUSHDATA->m_stipple.GetMask()) - M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE; + M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE; else - M_BRUSHDATA->m_style = wxSTIPPLE; + M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK; } wxBrush::~wxBrush() @@ -158,11 +158,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple ) M_BRUSHDATA->m_stipple = stipple; if (M_BRUSHDATA->m_stipple.GetMask()) - { - M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE; - } + M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE; else - { - M_BRUSHDATA->m_style = wxSTIPPLE; - } + M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK; } diff --git a/src/x11/pen.cpp b/src/x11/pen.cpp index 1c274eb754..c6f9366587 100644 --- a/src/x11/pen.cpp +++ b/src/x11/pen.cpp @@ -156,11 +156,11 @@ void wxPen::SetJoin( wxPenJoin joinStyle ) M_PENDATA->m_joinStyle = joinStyle; } -void wxPen::SetStipple( wxBitmap *stipple ) +void wxPen::SetStipple( const wxBitmap& stipple ) { AllocExclusive(); - M_PENDATA->m_stipple = *stipple; + M_PENDATA->m_stipple = stipple; } void wxPen::SetStyle( wxPenStyle style ) @@ -197,21 +197,21 @@ wxDash* wxPen::GetDash() const wxPenCap wxPen::GetCap() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( Ok(), wxCAP_INVALID, wxT("invalid pen") ); return M_PENDATA->m_capStyle; } wxPenJoin wxPen::GetJoin() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( Ok(), wxJOIN_INVALID, wxT("invalid pen") ); return M_PENDATA->m_joinStyle; } wxPenStyle wxPen::GetStyle() const { - wxCHECK_MSG( Ok(), -1, wxT("invalid pen") ); + wxCHECK_MSG( Ok(), wxPENSTYLE_INVALID, wxT("invalid pen") ); return M_PENDATA->m_style; } -- 2.45.2