X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8602802568e2dcd29298c0d802d7c44fd231845b..c29c95fe24973b94fd724db767193171ca7c513d:/interface/wx/brush.h?ds=sidebyside diff --git a/interface/wx/brush.h b/interface/wx/brush.h index 945f1d7487..44f9c89e20 100644 --- a/interface/wx/brush.h +++ b/interface/wx/brush.h @@ -3,7 +3,7 @@ // Purpose: interface of wxBrush // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -172,12 +172,47 @@ public: virtual bool IsHatch() const; /** - Returns @true if the brush is initialised. It will return @false if the default - constructor has been used (for example, the brush is a member of a class, or - @NULL has been assigned to it). + Returns @true if the brush is initialised. + + Notice that an uninitialized brush object can't be queried for any + brush properties and all calls to the accessor methods on it will + result in an assert failure. */ virtual bool IsOk() const; + /** + Returns @true if the brush is a valid non-transparent brush. + + This method returns @true if the brush object is initialized and has a + non-transparent style. Notice that this should be used instead of + simply testing whether GetStyle() returns a style different from + wxBRUSHSTYLE_TRANSPARENT if the brush may be invalid as GetStyle() + would assert in this case. + + @see IsTransparent() + + @since 2.9.2. + */ + bool IsNonTransparent() const; + + /** + Returns @true if the brush is transparent. + + A transparent brush is simply a brush with wxBRUSHSTYLE_TRANSPARENT + style. + + Notice that this function works even for non-initialized brushes (for + which it returns @false) unlike tests of the form GetStyle() == + wxBRUSHSTYLE_TRANSPARENT which would assert if the brush is + invalid. + + @see IsNonTransparent() + + @since 2.9.2. + */ + bool IsTransparent() const; + + //@{ /** Sets the brush colour using red, green and blue values.