]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/brush.cpp
don't do anything before including the PCH header
[wxWidgets.git] / src / os2 / brush.cpp
index d4a0a320dd8d64dd38e49e789392f94776b5c116..91b77c959e55679c07f6a1aaa37df0ab100633c9 100644 (file)
@@ -197,8 +197,8 @@ bool wxBrush::RealizeResource()
         bOk = (bool)::GpiSetAttrs( M_BRUSHDATA->m_hBrush
                                   ,PRIM_AREA
                                   ,ABB_COLOR | ABB_BACK_COLOR | ABB_MIX_MODE | ABB_BACK_MIX_MODE |
-                                   ABB_SET | ABB_SYMBOL
-                                  ,ABB_REF_POINT
+                                   ABB_SET | ABB_SYMBOL | ABB_REF_POINT
+                                  ,ABB_SET | ABB_SYMBOL | ABB_REF_POINT
                                   ,&M_BRUSHDATA->m_vBundle
                                  );
         if (!bOk)
@@ -212,7 +212,7 @@ bool wxBrush::RealizeResource()
     return false;
 } // end of wxBrush::RealizeResource
 
-WXHANDLE wxBrush::GetResourceHandle()
+WXHANDLE wxBrush::GetResourceHandle() const
 {
     if (!M_BRUSHDATA)
         return 0;
@@ -291,3 +291,16 @@ void wxBrush::SetPS(
     M_BRUSHDATA->m_hBrush = hPS;
     RealizeResource();
 } // end of WxWinGdi_CPen::SetPS
+
+
+bool wxBrush::operator == (
+    const wxBrush& brush
+) const
+{
+    if (m_refData == brush.m_refData) return true;
+
+    if (!m_refData || !brush.m_refData) return false;
+
+    return ( *(wxBrushRefData*)m_refData == *(wxBrushRefData*)brush.m_refData );
+} // end of wxBrush::operator ==
+