cairo.region
Module for [Region] class
class Region
Types 1
classRegion : gobject.boxed.Boxed
A #cairo_region_t represents a set of integer-aligned rectangles.
It allows set-theoretical operations like cairo.region.Region.union_ and cairo.region.Region.intersect to be performed on them.
Memory management of #cairo_region_t is done with cairo.region.Region.reference and cairo.region.Region.destroy.
Methods
cairo.types.Bool containsPoint(int x, int y) nothrowChecks whether (`x`, `y`) is contained in region.cairo.types.RegionOverlap containsRectangle(cairo.types.RectangleInt rectangle) nothrowChecks whether rectangle is inside, outside or partially contained in regioncairo.region.Region copy() nothrowAllocates a new region object copying the area from original. Returns: A newly allocated #cairo_region_t. Free with [cairo.region.Region.destroy]. This function always returns a valid pointer; if m...cairo.types.Bool equal(cairo.region.Region b) nothrowCompares whether region_a is equivalent to region_b. null as an argument is equal to itself, but not to any non-null region.void getExtents(out cairo.types.RectangleInt extents) nothrowGets the bounding rectangle of region as a #cairo_rectangle_int_tvoid getRectangle(int nth, out cairo.types.RectangleInt rectangle) nothrowStores the nth rectangle from the region in rectangle.cairo.types.Status intersect(cairo.region.Region other) nothrowComputes the intersection of dst with other and places the result in dstcairo.types.Status intersectRectangle(cairo.types.RectangleInt rectangle) nothrowComputes the intersection of dst with rectangle and places the result in dstcairo.types.Bool isEmpty() nothrowChecks whether region is empty. Returns: true if region is empty, false if it isn't.int numRectangles() nothrowReturns the number of rectangles contained in region. Returns: The number of rectangles contained in region.cairo.types.Status status() nothrowChecks whether an error has previous occurred for this region object. Returns: [cairo.types.Status.Success] or [cairo.types.Status.NoMemory]cairo.types.Status subtract(cairo.region.Region other) nothrowSubtracts other from dst and places the result in dstcairo.types.Status subtractRectangle(cairo.types.RectangleInt rectangle) nothrowSubtracts rectangle from dst and places the result in dstcairo.types.Status union_(cairo.region.Region other) nothrowComputes the union of dst with other and places the result in dstcairo.types.Status unionRectangle(cairo.types.RectangleInt rectangle) nothrowComputes the union of dst with rectangle and places the result in dst.cairo.types.Status xor(cairo.region.Region other) nothrowComputes the exclusive difference of dst with other and places the result in dst. That is, dst will be set to contain all areas that are either in dst or in other, but not in both.cairo.types.Status xorRectangle(cairo.types.RectangleInt rectangle) nothrowComputes the exclusive difference of dst with rectangle and places the result in dst. That is, dst will be set to contain all areas that are either in dst or in rectangle, but not in both.