gtk.gdk.Region — an object representing a set of pixels on the screen (new in PyGTK 2.10)
class gtk.gdk.Region(gobject.GBoxed): |
Functions
|
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).
|
Returns : | a new gtk.gdk.Region object |
This constructor is available in PyGTK 2.10 and above.
Creates a new gtk.gdk.Region.
|
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.
|
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.
|
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.
|
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.
|
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 GDK Overlap Type Constants depending whether the rectangle specified by rect is inside, outside, or partly inside this region.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.