<?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><year>2021</year>
    <holder>wxWidgets team.</holder></copyright>
  <legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
  </legalnotice>
  <title>wxRegion</title>
</header>
<module>wxRegion</module>
<modulesummary>Functions for wxRegion class</modulesummary>
<description><p>A <seeerl marker="wxRegion"><c>wxRegion</c></seeerl> represents a simple or complex region on a device context or window.
      </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 (include wx.hrl):
      </p><p>See: <c>wxRegionIterator</c> (not implemented in wx)
      </p>
  <p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_region.html">wxRegion</url></p>
  </description>
<datatypes><datatype><name name="wxRegion"/></datatype></datatypes>

<funcs>
  <func>
    <name name="new" arity="0" clause_i="1" since=""/>
    <fsummary>Default constructor. </fsummary>
    <desc><p>Default constructor. 
      </p><p>This constructor creates an invalid, or null, object, i.e. calling IsOk() on it returns false and <seemfa marker="#isEmpty/1"><c>isEmpty/1</c></seemfa> returns true. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="1" clause_i="1" since=""/>
  
    <name name="new" arity="1" clause_i="2" since=""/>
    <fsummary>Constructs a region using a bitmap. </fsummary>
    <desc><p>Constructs a region using a bitmap. 
      </p><p>See <seemfa marker="#union/5"><c>union/5</c></seemfa> for more details. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="2" clause_i="1" since=""/>
    <fsummary>Constructs a rectangular region from the top left point and the bottom right point. </fsummary>
    <desc><p>Constructs a rectangular region from the top left point and the bottom right point. 
      </p></desc>
  </func>
  
  <func>
    <name name="new" arity="4" clause_i="1" since=""/>
    <fsummary>Constructs a rectangular region with the given position and size. </fsummary>
    <desc><p>Constructs a rectangular region with the given position and size. 
      </p></desc>
  </func>
  
  <func>
    <name name="destroy" arity="1" clause_i="1" since=""/>
    <fsummary>Destructor. </fsummary>
    <desc><p>Destructor. 
      </p><p>See reference-counted object destruction for more info. 
      </p></desc>
  </func>
  
  <func>
    <name name="clear" arity="1" clause_i="1" since=""/>
    <fsummary>Clears the current region. </fsummary>
    <desc><p>Clears the current region. 
      </p><p>The object becomes invalid, or null, after being cleared. 
      </p></desc>
  </func>
  
  <func>
    <name name="contains" arity="2" clause_i="1" since=""/>
  
    <name name="contains" arity="2" clause_i="2" since=""/>
    <fsummary>Returns a value indicating whether the given rectangle is contained within the region. </fsummary>
    <desc><p>Returns a value indicating whether the given rectangle is contained within the region. 
      </p><p>This method always returns <c>wxOutRegion</c> for an invalid region but may, nevertheless, be safely called in this case.
      </p><p>Return: One of ?wxOutRegion, ?wxPartRegion or ?wxInRegion.
      </p><p>Note: On Windows, only ?wxOutRegion and ?wxInRegion are returned; a value ?wxInRegion then indicates that all or some part of the region is contained in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="contains" arity="3" clause_i="1" since=""/>
    <fsummary>Returns a value indicating whether the given point is contained within the region. </fsummary>
    <desc><p>Returns a value indicating whether the given point is contained within the region. 
      </p><p>This method always returns <c>wxOutRegion</c> for an invalid region but may, nevertheless, be safely called in this case.
      </p><p>Return: The return value is one of <c>wxOutRegion</c> and <c>wxInRegion</c>. 
      </p></desc>
  </func>
  
  <func>
    <name name="contains" arity="5" clause_i="1" since=""/>
    <fsummary>Returns a value indicating whether the given rectangle is contained within the region. </fsummary>
    <desc><p>Returns a value indicating whether the given rectangle is contained within the region. 
      </p><p>This method always returns <c>wxOutRegion</c> for an invalid region but may, nevertheless, be safely called in this case.
      </p><p>Return: One of ?wxOutRegion, ?wxPartRegion or ?wxInRegion.
      </p><p>Note: On Windows, only ?wxOutRegion and ?wxInRegion are returned; a value ?wxInRegion then indicates that all or some part of the region is contained in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="convertToBitmap" arity="1" clause_i="1" since=""/>
    <fsummary>Convert the region to a black and white bitmap with the white pixels being inside the region. </fsummary>
    <desc><p>Convert the region to a black and white bitmap with the white pixels being inside the region. 
      </p><p>This method can't be used for invalid region. 
      </p></desc>
  </func>
  
  <func>
    <name name="getBox" arity="1" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="intersect" arity="2" clause_i="1" since=""/>
  
    <name name="intersect" arity="2" clause_i="2" since=""/>
    <fsummary>Finds the intersection of this region and another region. </fsummary>
    <desc><p>Finds the intersection of this region and another region. 
      </p><p>This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="intersect" arity="5" clause_i="1" since=""/>
    <fsummary>Finds the intersection of this region and another, rectangular region, specified using position and size. </fsummary>
    <desc><p>Finds the intersection of this region and another, rectangular region, specified using position and size. 
      </p><p>This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="isEmpty" arity="1" clause_i="1" since=""/>
    <fsummary>Returns true if the region is empty, false otherwise. </fsummary>
    <desc><p>Returns true if the region is empty, false otherwise. 
      </p><p>Always returns true if the region is invalid. 
      </p></desc>
  </func>
  
  <func>
    <name name="subtract" arity="2" clause_i="1" since=""/>
  
    <name name="subtract" arity="2" clause_i="2" since=""/>
    <fsummary>Subtracts a region from this region. </fsummary>
    <desc><p>Subtracts a region from this region. 
      </p><p>This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation combines the parts of 'this' region that are not part of the second region. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="offset" arity="2" clause_i="1" since=""/>
    <fsummary/>
    <desc/>
  </func>
  
  <func>
    <name name="offset" arity="3" clause_i="1" since=""/>
    <fsummary>Moves the region by the specified offsets in horizontal and vertical directions. </fsummary>
    <desc><p>Moves the region by the specified offsets in horizontal and vertical directions. 
      </p><p>This method can't be called if the region is invalid as it doesn't make sense to offset it then. Attempts to do it will result in assert failure.
      </p><p>Return: true if successful, false otherwise (the region is unchanged then). 
      </p></desc>
  </func>
  
  <func>
    <name name="union" arity="2" clause_i="1" since=""/>
  
    <name name="union" arity="2" clause_i="2" since=""/>
    <fsummary>Finds the union of this region and another, rectangular region. </fsummary>
    <desc><p>Finds the union of this region and another, rectangular region. 
      </p><p>This method can be used even if this region is invalid and has the natural behaviour in this case, i.e. makes this region equal to the given rectangle.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation creates a region that combines all of this region and the second region. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="union" arity="3" clause_i="1" since=""/>
    <fsummary>See: <c>union/4</c></fsummary>
  </func>
  
  <func>
    <name name="union" arity="4" clause_i="1" since=""/>
    <fsummary>Finds the union of this region and the non-transparent pixels of a bitmap. </fsummary>
    <desc><p>Finds the union of this region and the non-transparent pixels of a bitmap. 
      </p><p>Colour to be treated as transparent is specified in the <c>transColour</c> argument, along with an optional colour tolerance value.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation creates a region that combines all of this region and the second region. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="union" arity="5" clause_i="1" since=""/>
    <fsummary>Finds the union of this region and another, rectangular region, specified using position and size. </fsummary>
    <desc><p>Finds the union of this region and another, rectangular region, specified using position and size. 
      </p><p>This method can be used even if this region is invalid and has the natural behaviour in this case, i.e. makes this region equal to the given rectangle.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation creates a region that combines all of this region and the second region. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="'Xor'" arity="2" clause_i="1" since=""/>
  
    <name name="'Xor'" arity="2" clause_i="2" since=""/>
    <fsummary>Finds the Xor of this region and another region. </fsummary>
    <desc><p>Finds the Xor of this region and another region. 
      </p><p>This method can be used even if this region is invalid and has the natural behaviour in this case, i.e. makes this region equal to the given <c>region</c>.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation creates a region that combines all of this region and the second region, except for any overlapping areas. The result is stored in this region. 
      </p></desc>
  </func>
  
  <func>
    <name name="'Xor'" arity="5" clause_i="1" since=""/>
    <fsummary>Finds the Xor of this region and another, rectangular region, specified using position and size. </fsummary>
    <desc><p>Finds the Xor of this region and another, rectangular region, specified using position and size. 
      </p><p>This method can be used even if this region is invalid and has the natural behaviour in this case, i.e. makes this region equal to the given rectangle.
      </p><p>Return: true if successful, false otherwise.
      </p><p>Remark: This operation creates a region that combines all of this region and the second region, except for any overlapping areas. The result is stored in this region. 
      </p></desc>
  </func>
  </funcs>
</erlref>
