<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<!-- THIS FILE IS GENERATED DO NOT EDIT -->


<erlref>
<header>
  <copyright>
    <year>2020</year>
    <holder>Ericsson AB. All Rights Reserved.</holder></copyright>
  <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.

  </legalnotice>
  <title>wxBrush</title>
</header>
<module>wxBrush</module>
<modulesummary>Functions for wxBrush class</modulesummary>
<description><p>A brush is a drawing tool for filling in areas. It is used for painting the background of rectangles, ellipses, etc. It has a colour and a style.
      </p><p>On a monochrome display, wxWidgets shows all brushes as white unless the colour is really black.
      </p><p>Do not initialize objects on the stack before the program commences, since other required structures may not have been set up yet. Instead, define global pointers to objects and create them in <c>wxApp::OnInit</c> (not implemented in wx) or when required.
      </p><p>An application may wish to create brushes with different characteristics dynamically, and there is the consequent danger that a large number of duplicate brushes will be created. Therefore an application may wish to get a pointer to a brush by using the global list of brushes ?wxTheBrushList, and calling the member function <c>wxBrushList::FindOrCreateBrush()</c> (not implemented in wx).
      </p><p>This class uses reference counting and copy-on-write internally so that assignments between two instances of this class are very cheap. You can therefore use actual objects instead of pointers without efficiency problems. If an instance of this class is changed it will create its own data internally so that other instances, which previously shared the data using the reference counting, are not affected.
      </p><p>Predefined objects/pointers: 
      </p><p>See: <c>wxBrushList</c> (not implemented in wx), <seeerl marker="wxDC"><c>wxDC</c></seeerl>, <seemfa marker="wxDC#setBrush/2"><c>wxDC:setBrush/2</c></seemfa>
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_brush.html">wxBrush</url></p>
  </description>
<datatypes><datatype><name name="wxBrush"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p><p>The brush will be uninitialised, and <seeerl marker="wxBrush"><c>wxBrush</c></seeerl>:<seemfa marker="#isOk/1"><c>isOk/1</c></seemfa> will return false. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>Copy constructor, uses reference counting. </fsummary>
    <desc><p>Copy constructor, uses reference counting. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Constructs a brush from a colour object and <c>style</c>. </fsummary>
    <desc><p>Constructs a brush from a colour object and <c>style</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See overview_refcount_destruct for more info.
      </p><p>Remark: Although all remaining brushes are deleted when the application exits, the application should try to clean up all brushes itself. This is because wxWidgets cannot know if a pointer to the brush object is stored in an application data structure, and there is a risk of double deletion. 
      </p></desc>
  </func>
  
  <func>
    <name name="getColour" arity="1" clause_i="1" since=""/>
    <fsummary>Returns a reference to the brush colour. </fsummary>
    <desc><p>Returns a reference to the brush colour. 
      </p><p>See: <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getStipple" arity="1" clause_i="1" since=""/>
    <fsummary>Gets a pointer to the stipple bitmap. </fsummary>
    <desc><p>Gets a pointer to the stipple bitmap. 
      </p><p>If the brush does not have a <c>wxBRUSHSTYLE_STIPPLE</c> style, this bitmap may be non-NULL but uninitialised (i.e. <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>:<seemfa marker="#isOk/1"><c>isOk/1</c></seemfa> returns false).
      </p><p>See: <seemfa marker="#setStipple/2"><c>setStipple/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="getStyle" arity="1" clause_i="1" since=""/>
    <fsummary>Returns the brush style, one of the ?wxBrushStyle values. </fsummary>
    <desc><p>Returns the brush style, one of the ?wxBrushStyle values. 
      </p><p>See: <seemfa marker="#setStyle/2"><c>setStyle/2</c></seemfa>, <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>, <seemfa marker="#setStipple/2"><c>setStipple/2</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isHatch" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the style of the brush is any of hatched fills. </fsummary>
    <desc><p>Returns true if the style of the brush is any of hatched fills. 
      </p><p>See: <seemfa marker="#getStyle/1"><c>getStyle/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="isOk" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the brush is initialised. </fsummary>
    <desc><p>Returns true if the brush is initialised. 
      </p><p>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. 
      </p></desc>
  </func>
  
  <func>
    <name name="setColour" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the brush colour using red, green and blue values. </fsummary>
    <desc><p>Sets the brush colour using red, green and blue values. 
      </p><p>See: <seemfa marker="#getColour/1"><c>getColour/1</c></seemfa>
      </p></desc>
  </func>
  
  <func>
    <name name="setColour" arity="4" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="setStipple" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the stipple bitmap. </fsummary>
    <desc><p>Sets the stipple bitmap. 
      </p><p>Remark: The style will be set to <c>wxBRUSHSTYLE_STIPPLE</c>, unless the bitmap has a mask associated to it, in which case the style will be set to <c>wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE</c>.
      </p><p>See: <seeerl marker="wxBitmap"><c>wxBitmap</c></seeerl>
      </p></desc>
  </func>
  
  <func>
    <name name="setStyle" arity="2" clause_i="1" since=""/>
    <fsummary>Sets the brush style. </fsummary>
    <desc><p>Sets the brush style. 
      </p><p>See: <seemfa marker="#getStyle/1"><c>getStyle/1</c></seemfa>
      </p></desc>
  </func>
  </funcs>
</erlref>
