A GdkRegion represents a set of pixels on the screen.

Class GdkRegion

Methods | |

copy | Copies region, creating an identical new region. |

empty | Finds out if the GdkRegion is empty. |

equal | Finds out if the two regions are the same. |

get_clipbox | Obtains the smallest rectangle which includes the entire GdkRegion. |

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

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

offset | Moves a region the specified distance. |

point_in | Finds out if a point is in a region. |

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

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

rect_in | Tests whether a rectangle is within a region. |

rectangle | Creates a new region containing the area rectangle. |

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

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

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

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

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

Copies region, creating an identical new region.

GdkRegion.copy()

Return | a new region identical to region |

Finds out if the GdkRegion is empty.

GdkRegion.empty()

Return | TRUE if region is empty. |

Finds out if the two regions are the same.

GdkRegion.equal( region )

region | a GdkRegion |

Return | TRUE if this and region are equal. |

Obtains the smallest rectangle which includes the entire GdkRegion.

GdkRegion.get_clipbox()

Return | a GdkRectangle |

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

GdkRegion.get_rectangles()

Return | an array of GdkRectangle |

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.

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 |

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 |

Return | TRUE if the point is in region. |

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). |

Return | a new GdkRegion based on the given polygon |

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

GdkRegion.rect_equal( rectangle )

rectangle | a GdkRectangle |

Return | TRUE if region and rectangle are equal. |

Tests whether a rectangle is within a region.

GdkRegion.rect_in( rectangle )

rectangle | a GdkRectangle |

Return | GDK_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. |

Creates a new region containing the area rectangle.

GdkRegion.rectangle( rectangle )

rectangle | a GdkRectangle |

Return | a new region |

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 |

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.

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.

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.

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