]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes after pen/brush styles changes
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Mar 2008 23:39:11 +0000 (23:39 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 21 Mar 2008 23:39:11 +0000 (23:39 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/x11/pen.h
src/x11/brush.cpp
src/x11/pen.cpp

index df8b0b67cfc6a255d0aa3652e37e5e1e03523ca0..fd2e6ad4db2469f1337879f3503aa90fb367b6a2 100644 (file)
@@ -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;
index e2628de2b3a1f6f3cb99bdd29b896372b1ffa2ff..f3a0ecd8cb413e98c9edb5511b936d197b4a4e58 100644 (file)
@@ -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;
 }
index 1c274eb754ec74049dfd8073a57069e3fd65430e..c6f93665872eeaa139f86fe4aae37e81566bbe91 100644 (file)
@@ -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;
 }