|
class gtk.gdk.Region(gobject.GBoxed): |
Functions
def gtk.gdk.region_rectangle(rectangle
)
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.
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
.
def 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.
def 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.
def equal(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.
def point_in(x
, y
)
| the x coordinate of a point. |
| 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.
def rect_in(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.
def 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.
def offset(dx
, dy
)
| the distance to move this region horizontally. |
| 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
.
def shrink(dx
, dy
)
| the number of pixels to shrink this region horizontally. |
| 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.
def union_with_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.
def intersect(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
.
def union(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
.
def subtract(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
.
def xor(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.
def gtk.gdk.region_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
.
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.