11.19Class GdkRegion

A GdkRegion represents a set of pixels on the screen.

Class GdkRegion
Methods
copyCopies region, creating an identical new region.
emptyFinds out if the GdkRegion is empty.
equalFinds out if the two regions are the same.
get_clipboxObtains the smallest rectangle which includes the entire GdkRegion.
get_rectanglesObtains the area covered by the region as a list of rectangles.
intersectSets the area of this instance to its intersection with the area of source.
offsetMoves a region the specified distance.
point_inFinds out if a point is in a region.
polygonCreates a new GdkRegion using the polygon defined by a number of points.
rect_equalFinds out if a regions is the same as a rectangle.
rect_inTests whether a rectangle is within a region.
rectangleCreates a new region containing the area rectangle.
shrinkResizes a region by the specified amount. Positive values shrink the region. Negative values expand it.
subtractSubtracts the area of source from the area of this instance.
unionSets the area of this instance to the union of the areas this region and source.
union_with_rectSets the area of region to the union of the areas of region and rect.
xorSets the area of this instance to the exclusive-OR of the areas of this region and source.

Methods

copy

Copies region, creating an identical new region.

GdkRegion.copy()
Returna new region identical to region

empty

Finds out if the GdkRegion is empty.

GdkRegion.empty()
ReturnTRUE if region is empty.

equal

Finds out if the two regions are the same.

GdkRegion.equal( region )
region a GdkRegion
ReturnTRUE if this and region are equal.

get_clipbox

Obtains the smallest rectangle which includes the entire GdkRegion.

GdkRegion.get_clipbox()
Returna GdkRectangle

get_rectangles

Obtains the area covered by the region as a list of rectangles.

GdkRegion.get_rectangles()
Returnan array of GdkRectangle

intersect

Sets the area of this instance to its intersection with the area of source.

GdkRegion.intersect( source )
source a GdkRegion

The resulting area is the set of pixels contained in both this region and source2.

offset

Moves a region the specified distance.

GdkRegion.offset( dx, dy )
dx the distance to move the region horizontally
dy the distance to move the region vertically

point_in

Finds out if a point is in a region.

GdkRegion.point_in( x, y )
x the x coordinate of a point
y the y coordinate of a point
ReturnTRUE if the point is in region.

polygon

Creates a new GdkRegion using the polygon defined by a number of points.

GdkRegion.polygon( points, fill_rule )
points an array of GdkPoint
fill_rule specifies which pixels are included in the region when the polygon overlaps itself (GdkFillRule).
Returna new GdkRegion based on the given polygon

rect_equal

Finds out if a regions is the same as a rectangle.

GdkRegion.rect_equal( rectangle )
rectangle a GdkRectangle
ReturnTRUE if region and rectangle are equal.

rect_in

Tests whether a rectangle is within a region.

GdkRegion.rect_in( rectangle )
rectangle a GdkRectangle
ReturnGDK_OVERLAP_RECTANGLE_IN, GDK_OVERLAP_RECTANGLE_OUT, or GDK_OVERLAP_RECTANGLE_PART, depending on whether the rectangle is inside, outside, or partly inside the GdkRegion, respectively.

rectangle

Creates a new region containing the area rectangle.

GdkRegion.rectangle( rectangle )
rectangle a GdkRectangle
Returna new region

shrink

Resizes a region by the specified amount. Positive values shrink the region. Negative values expand it.

GdkRegion.shrink( dx, dy )
dx the number of pixels to shrink the region horizontally
dy the number of pixels to shrink the region vertically

subtract

Subtracts the area of source from the area of this instance.

GdkRegion.subtract( source )
source another GdkRegion

The resulting area is the set of pixels contained in this region but not in source.

union

Sets the area of this instance to the union of the areas this region and source.

GdkRegion.union( source )
source a GdkRegion

The resulting area is the set of pixels contained in either this region or source.

union_with_rect

Sets the area of region to the union of the areas of region and rect.

GdkRegion.union_with_rect( rect )
rect a GdkRectangle

The resulting area is the set of pixels contained in either region or rect.

xor

Sets the area of this instance to the exclusive-OR of the areas of this region and source.

GdkRegion.xor( source )
source another GdkRegion

The resulting area is the set of pixels contained in one or the other of the two sources but not in both.

Made with http://www.falconpl.org