virtual bool IsHatch() const
{ return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
-#if FUTURE_WXWIN_COMPATIBILITY_3_0
- wxDEPRECATED_FUTURE( void SetStyle(int style) )
- { SetStyle((wxBrushStyle)style); }
-#endif
+ // Convenient helpers for testing whether the brush is a transparent one:
+ // unlike GetStyle() == wxBRUSHSTYLE_TRANSPARENT, they work correctly even
+ // if the brush is invalid (they both return false in this case).
+ bool IsTransparent() const
+ {
+ return IsOk() && GetStyle() == wxBRUSHSTYLE_TRANSPARENT;
+ }
+
+ bool IsNonTransparent() const
+ {
+ return IsOk() && GetStyle() != wxBRUSHSTYLE_TRANSPARENT;
+ }
};
#if defined(__WXPALMOS__)
inline bool operator==(wxBrushStyle s, wxDeprecatedGUIConstants t)
{
- return wx_static_cast(int, s) == wx_static_cast(int, t);
+ return static_cast<int>(s) == static_cast<int>(t);
}
inline bool operator!=(wxBrushStyle s, wxDeprecatedGUIConstants t)