gtk.gdk.Region an object representing a set of pixels on the screen (new in PyGTK 2.10) Synopsis gtk.gdk.Region gobject.GBoxed gtk.gdk.Region get_clipbox empty equal other point_in x y rect_in rect copy offset dx dy shrink dx dy union_with_rect rect intersect source2 union source2 subtract source2 xor source2 Functions gtk.gdk.region_rectangle rectangle Description A gtk.gdk.Region is an objrect holding a set of arbitrary pixels, and is usually used for clipping graphical operations (see the gtk.gdk.GC.set_clip_region() method). Starting with PyGTK 2.14 gtk.gdk.Region objects are properly comparable. By Python rules, regions (being mutable) are now unhashable. Constructor gtk.gdk.Region Returns : a new gtk.gdk.Region object This constructor is available in PyGTK 2.10 and above. Creates a new gtk.gdk.Region. Methods gtk.gdk.Region.get_clipbox get_clipbox Returns : returns the smallest rectangle which includes all of the region. This method is available in PyGTK 2.10 and above. The get_clipbox() method returns the smallest rectangle which includes the entire region. gtk.gdk.Region.empty empty Returns : True if the region is empty. This method is available in PyGTK 2.10 and above. The empty() method returns True if the region is empty. gtk.gdk.Region.equal equal other other : a gtk.gdk.Region Returns : True if the region is equal to other This method is available in PyGTK 2.10 and above. The equal() method returns True if the region specified by other is equal to this region. Since PyGTK 2.14 Python comparison operator (==) can be used for the same result. gtk.gdk.Region.point_in point_in x y x : the x coordinate of a point. y : the y coordinate of a point. Returns : True if the point (x,y) is in the region. This method is available in PyGTK 2.10 and above. The () method returns True if the point specified by the coordinates x and y is in a region. gtk.gdk.Region.rect_in rect_in rect rect : a rectangle (gtk.gdk.Rectangle or 4-tuple representing a rectangle) Returns : a value indicating whether rectangle is inside or outside the region. This method is available in PyGTK 2.10 and above. The rect_in() method returns one of the depending whether the rectangle specified by rect is inside, outside, or partly inside this region. gtk.gdk.Region.copy copy Returns : a new gtk.gdk.Region identical to the region This method is available in PyGTK 2.10 and above. The copy() method returns a new gtk.gdk.Region identical to this region. gtk.gdk.Region.offset offset dx dy dx : the distance to move this region horizontally. dy : the distance to move this region vertically. This method is available in PyGTK 2.10 and above. The offset() method moves this region the distance specified by dx and dy. gtk.gdk.Region.shrink shrink dx dy dx : the number of pixels to shrink this region horizontally. dy : the number of pixels to shrink this region vertically. This method is available in PyGTK 2.10 and above. The shrink() method resizes this region by the amount specified by dx and dy. Positive values shrink the region. Negative values expand it. gtk.gdk.Region.union_with_rect union_with_rect rect rect : a rectangle This method is available in PyGTK 2.10 and above. The union_with_rect() method sets the area of this region to the union of the areas of this region and the rectangle specified by rect. The resulting area is the set of pixels contained in either the region or rect. The value of rect is either a gtk.gdk.Rectangle or a 4-tuple containing the position and size of a rectangle. gtk.gdk.Region.intersect intersect source2 source2 : a gtk.gdk.Region This method is available in PyGTK 2.10 and above. The intersect() method sets the area of this region to the intersection of the areas of this region and the region specified by source2. The resulting area is the set of pixels contained in both this region and source2. gtk.gdk.Region.union union source2 source2 : a gtk.gdk.Region. This method is available in PyGTK 2.10 and above. The union() method sets the area of this region to the union of the areas of this region and the region specified by source2. The resulting area is the set of pixels contained in either this region or source2. gtk.gdk.Region.subtract subtract source2 source2 : a gtk.gdk.Region. This method is available in PyGTK 2.10 and above. The subtract() method sets the area of this region to the subtraction of the areas of this region and the region specified by source2. The resulting area is the set of pixels contained in this region but not in source2. gtk.gdk.Region.xor xor source2 source2 : a gtk.gdk.Region. This method is available in PyGTK 2.10 and above. The xor() method sets the area of this region to the exclusive-OR of the areas of this region and the region specified by source2. The resulting area is the set of pixels contained in either this region or source2 but not both. Functions gtk.gdk.region_rectangle gtk.gdk.region_rectangle rectangle rectangle : a gtk.gdk.Rectangle or a 4-tuple representing a rectangle. Returns : a new gtk.gdk.Region This function is available in PyGTK 2.10 and above. The gtk.gdk.region_rectangle() function creates a new gtk.gdk.Region containing the area specified by rectangle.