Class: Wx::RegionIterator

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/region_iterator.rb,
lib/wx/doc/region_iterator.rb

Overview

This class is used to iterate through the rectangles in a region, typically when examining the damaged regions of a window within an OnPaint call.

To use it, construct an iterator object on the stack and loop through the regions, testing the object and incrementing the iterator at the end of the loop. See PaintEvent for an example of use.

Category: Graphics Device Interface (GDI) Predefined objects/pointers: NullRegion

See Also:

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::RegionIterator #initialize(region) ⇒ Wx::RegionIterator

Returns a new instance of RegionIterator.

Overloads:



28
# File 'lib/wx/doc/gen/region_iterator.rb', line 28

def initialize(*args) end

Class Method Details

.for_region(region) {|region_it| ... } ⇒ Object

Creates a Wx::RegionIterator and passes that to the given block. Removes the iterator after the block finishes.

Parameters:

Yield Parameters:



16
# File 'lib/wx/doc/region_iterator.rb', line 16

def self.for_region(region)  end

.iterate(region) {|region_it| ... } ⇒ Object

Creates a Wx::RegionIterator and iterates each rectangle in the region executing the given block for each iteration passing the region iterator.

Parameters:

Yield Parameters:



22
# File 'lib/wx/doc/region_iterator.rb', line 22

def self.iterate(region) end

Instance Method Details

#each {|rect| ... } ⇒ ::Object #eachEnumerator

If a block is given the given block is called for each rectangle in the region passing the rectangle. If no block is given an Enumerator is returned.

Overloads:

  • #each {|rect| ... } ⇒ ::Object

    Yield Parameters:

    Returns:

    • (::Object)
  • #eachEnumerator

    Returns:

    • (Enumerator)


37
# File 'lib/wx/doc/region_iterator.rb', line 37

def each; end

#get_hInteger Also known as: h

An alias for #get_height.

Returns:

  • (Integer)


32
# File 'lib/wx/doc/gen/region_iterator.rb', line 32

def get_h; end

#get_heightInteger Also known as: height

Returns the height value for the current region.

Returns:

  • (Integer)


37
# File 'lib/wx/doc/gen/region_iterator.rb', line 37

def get_height; end

#get_rectWx::Rect Also known as: rect

Returns the current rectangle.

Returns:



42
# File 'lib/wx/doc/gen/region_iterator.rb', line 42

def get_rect; end

#get_wInteger Also known as: w

An alias for #get_width.

Returns:

  • (Integer)


47
# File 'lib/wx/doc/gen/region_iterator.rb', line 47

def get_w; end

#get_widthInteger Also known as: width

Returns the width value for the current region.

Returns:

  • (Integer)


52
# File 'lib/wx/doc/gen/region_iterator.rb', line 52

def get_width; end

#get_xInteger Also known as: x

Returns the x value for the current region.

Returns:

  • (Integer)


57
# File 'lib/wx/doc/gen/region_iterator.rb', line 57

def get_x; end

#get_yInteger Also known as: y

Returns the y value for the current region.

Returns:

  • (Integer)


62
# File 'lib/wx/doc/gen/region_iterator.rb', line 62

def get_y; end

#have_rectsBoolean

Returns true if there are still some rectangles; otherwise returns false.

Returns:

  • (Boolean)


67
# File 'lib/wx/doc/gen/region_iterator.rb', line 67

def have_rects; end

#have_rects?Object



24
# File 'lib/wx/doc/region_iterator.rb', line 24

alias :have_rects? :have_rects

#next_rectvoid

This method returns an undefined value.

Moves to the next rectangle of the iterated region.



28
# File 'lib/wx/doc/region_iterator.rb', line 28

def next_rect; end

#resetvoid

This method returns an undefined value.

Resets the iterator to the beginning of the rectangles.



71
# File 'lib/wx/doc/gen/region_iterator.rb', line 71

def reset; end