# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation 
# generator. Do not alter this file.
# :startdoc:


module Wx

  # Types of results returned from a call to {Wx::Region#contains}.
  # 
  # 
  # 
  class RegionContain < Wx::Enum
  
    # The specified value is not contained within this region.
    # 
    OutRegion = Wx::RegionContain.new(0)
    
    # The specified value is partially contained within this region.
    # 
    PartRegion = Wx::RegionContain.new(1)
    
    # The specified value is fully contained within this region.
    # 
    InRegion = Wx::RegionContain.new(2)
    
  end # RegionContain
  
  # A {Wx::Region} represents a simple or complex region on a device context or window.
  # 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.
  # Predefined objects/pointers:
  # - {Wx::NullRegion}
  # 
  # === 
  # 
  # Category:  Data Structures, Graphics Device Interface (GDI)
  # @see Wx::RegionIterator 
  # 
  # 
  class Region < GDIObject
  
    # @overload get_box(x, y, width, height)
    #   Returns the outer bounds of the region.
    #   This method returns 0-sized bounding box for invalid regions.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [void]
    # @overload get_box()
    #   Returns the outer bounds of the region.
    #   This method returns 0-sized bounding box for invalid regions.
    #   @return [Wx::Rect]
    def get_box(*args) end
    alias_method :box, :get_box
    
    # @overload offset(x, y)
    #   Moves the region by the specified offsets in horizontal and vertical directions.
    #   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.
    #   true if successful, false otherwise (the region is unchanged then).
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @return [true,false]
    # @overload offset(pt)
    #   Moves the region by the specified offsets in horizontal and vertical directions.
    #   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.
    #   true if successful, false otherwise (the region is unchanged then).
    #   @param pt [Array(Integer, Integer), Wx::Point] 
    #   @return [true,false]
    def offset(*args) end
    
    # @overload initialize()
    #   Default constructor.
    #   This constructor creates an invalid, or null, object, i.e. calling IsOk() on it returns false and {Wx::Region#is_empty} returns true.
    #   @return [Region]
    # @overload initialize(x, y, width, height)
    #   Constructs a rectangular region with the given position and size.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [Region]
    # @overload initialize(topLeft, bottomRight)
    #   Constructs a rectangular region from the top left point and the bottom right point.
    #   @param topLeft [Array(Integer, Integer), Wx::Point] 
    #   @param bottomRight [Array(Integer, Integer), Wx::Point] 
    #   @return [Region]
    # @overload initialize(rect)
    #   Constructs a rectangular region a {Wx::Rect} object.
    #   @param rect [Wx::Rect] 
    #   @return [Region]
    # @overload initialize(region)
    #   Copy constructor, uses Reference Counting.
    #   @param region [Wx::Region] 
    #   @return [Region]
    # @overload initialize(points, fillStyle=Wx::ODDEVEN_RULE)
    #   Constructs a region corresponding to the polygon made of n points in the provided array.
    #   fillStyle parameter may have values {Wx::PolygonFillMode::WINDING_RULE} or {Wx::PolygonFillMode::ODDEVEN_RULE}.
    #   @param points [Array<Wx::Point>,Array<Array<Integer>>] 
    #   @param fillStyle [PolygonFillMode] 
    #   @return [Region]
    # @overload initialize(bmp)
    #   Constructs a region using a bitmap.
    #   See {Wx::Region#union} for more details.
    #   @param bmp [Wx::Bitmap] 
    #   @return [Region]
    # @overload initialize(bmp, transColour, tolerance=0)
    #   Constructs a region using the non-transparent pixels of a bitmap.
    #   See {Wx::Region#union} for more details.
    #   @param bmp [Wx::Bitmap] 
    #   @param transColour [Wx::Colour,String,Symbol] 
    #   @param tolerance [Integer] 
    #   @return [Region]
    def initialize(*args) end
    
    # Clears the current region.
    # The object becomes invalid, or null, after being cleared.
    # @return [void]
    def clear; end
    
    # @overload contains(x, y)
    #   Returns a value indicating whether the given point is contained within the region.
    #   This method always returns {Wx::RegionContain::OutRegion} for an invalid region but may, nevertheless, be safely called in this case.
    #   The return value is one of {Wx::RegionContain::OutRegion} and {Wx::RegionContain::InRegion}.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @return [RegionContain]
    # @overload contains(pt)
    #   Returns a value indicating whether the given point is contained within the region.
    #   This method always returns {Wx::RegionContain::OutRegion} for an invalid region but may, nevertheless, be safely called in this case.
    #   The return value is one of {Wx::RegionContain::OutRegion} and {Wx::RegionContain::InRegion}.
    #   @param pt [Array(Integer, Integer), Wx::Point] 
    #   @return [RegionContain]
    # @overload contains(x, y, width, height)
    #   Returns a value indicating whether the given rectangle is contained within the region.
    #   This method always returns {Wx::RegionContain::OutRegion} for an invalid region but may, nevertheless, be safely called in this case.
    #   One of {Wx::RegionContain::OutRegion}, {Wx::RegionContain::PartRegion} or {Wx::RegionContain::InRegion}.
    #   
    #   On Windows, only {Wx::RegionContain::OutRegion} and {Wx::RegionContain::InRegion} are returned; a value {Wx::RegionContain::InRegion} then indicates that all or some part of the region is contained in this region.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [RegionContain]
    # @overload contains(rect)
    #   Returns a value indicating whether the given rectangle is contained within the region.
    #   This method always returns {Wx::RegionContain::OutRegion} for an invalid region but may, nevertheless, be safely called in this case.
    #   One of {Wx::RegionContain::OutRegion}, {Wx::RegionContain::PartRegion} or {Wx::RegionContain::InRegion}.
    #   
    #   On Windows, only {Wx::RegionContain::OutRegion} and {Wx::RegionContain::InRegion} are returned; a value {Wx::RegionContain::InRegion} then indicates that all or some part of the region is contained in this region.
    #   @param rect [Wx::Rect] 
    #   @return [RegionContain]
    def contains(*args) end
    
    # Convert the region to a black and white bitmap with the white pixels being inside the region.
    # This method can't be used for invalid region.
    # @return [Wx::Bitmap]
    def convert_to_bitmap; end
    
    # @overload intersect(x, y, width, height)
    #   Finds the intersection of this region and another, rectangular region, specified using position and size.
    #   This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
    #   true if successful, false otherwise.
    #   
    #   Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [true,false]
    # @overload intersect(rect)
    #   Finds the intersection of this region and another, rectangular region.
    #   This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
    #   true if successful, false otherwise.
    #   
    #   Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region.
    #   @param rect [Wx::Rect] 
    #   @return [true,false]
    # @overload intersect(region)
    #   Finds the intersection of this region and another region.
    #   This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
    #   true if successful, false otherwise.
    #   
    #   Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region.
    #   @param region [Wx::Region] 
    #   @return [true,false]
    def intersect(*args) end
    
    # Returns true if the region is empty, false otherwise.
    # Always returns true if the region is invalid.
    # @return [true,false]
    def is_empty; end
    alias_method :empty?, :is_empty
    
    # Returns true if the region is equal to, i.e. covers the same area as, another one.
    # If both this region and region are both invalid, they are considered to be equal.
    # @param region [Wx::Region] 
    # @return [true,false]
    def is_equal(region) end
    alias_method :equal?, :is_equal
    
    # @overload subtract(rect)
    #   Subtracts a rectangular region from this region.
    #   This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
    #   true if successful, false otherwise.
    #   
    #   This operation combines the parts of 'this' region that are not part of the second region. The result is stored in this region.
    #   @param rect [Wx::Rect] 
    #   @return [true,false]
    # @overload subtract(region)
    #   Subtracts a region from this region.
    #   This method always fails, i.e. returns false, if this region is invalid but may nevertheless be safely used even in this case.
    #   true if successful, false otherwise.
    #   
    #   This operation combines the parts of 'this' region that are not part of the second region. The result is stored in this region.
    #   @param region [Wx::Region] 
    #   @return [true,false]
    def subtract(*args) end
    
    # @overload union(x, y, width, height)
    #   Finds the union of this region and another, rectangular region, specified using position and size.
    #   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.
    #   true if successful, false otherwise.
    #   
    #   This operation creates a region that combines all of this region and the second region. The result is stored in this region.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [true,false]
    # @overload union(rect)
    #   Finds the union of this region and another, rectangular region.
    #   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.
    #   true if successful, false otherwise.
    #   
    #   This operation creates a region that combines all of this region and the second region. The result is stored in this region.
    #   @param rect [Wx::Rect] 
    #   @return [true,false]
    # @overload union(region)
    #   Finds the union of this region and another region.
    #   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 region.
    #   true if successful, false otherwise.
    #   
    #   This operation creates a region that combines all of this region and the second region. The result is stored in this region.
    #   @param region [Wx::Region] 
    #   @return [true,false]
    # @overload union(bmp)
    #   Finds the union of this region and the non-transparent pixels of a bitmap.
    #   The bitmap's mask is used to determine transparency. If the bitmap doesn't have a mask, the bitmap's full dimensions are used.
    #   true if successful, false otherwise.
    #   
    #   This operation creates a region that combines all of this region and the second region. The result is stored in this region.
    #   @param bmp [Wx::Bitmap] 
    #   @return [true,false]
    # @overload union(bmp, transColour, tolerance=0)
    #   Finds the union of this region and the non-transparent pixels of a bitmap.
    #   Colour to be treated as transparent is specified in the transColour argument, along with an optional colour tolerance value.
    #   true if successful, false otherwise.
    #   
    #   This operation creates a region that combines all of this region and the second region. The result is stored in this region.
    #   @param bmp [Wx::Bitmap] 
    #   @param transColour [Wx::Colour,String,Symbol] 
    #   @param tolerance [Integer] 
    #   @return [true,false]
    def union(*args) end
    
    # @overload xor(x, y, width, height)
    #   Finds the Xor of this region and another, rectangular region, specified using position and size.
    #   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.
    #   true if successful, false otherwise.
    #   
    #   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.
    #   @param x [Integer] 
    #   @param y [Integer] 
    #   @param width [Integer] 
    #   @param height [Integer] 
    #   @return [true,false]
    # @overload xor(rect)
    #   Finds the Xor of this region and another, rectangular region.
    #   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.
    #   true if successful, false otherwise.
    #   
    #   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.
    #   @param rect [Wx::Rect] 
    #   @return [true,false]
    # @overload xor(region)
    #   Finds the Xor of this region and another region.
    #   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 region.
    #   true if successful, false otherwise.
    #   
    #   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.
    #   @param region [Wx::Region] 
    #   @return [true,false]
    def xor(*args) end
    
  end # Region
  

end