cairo.region

Module for [Region] class

class Region

Types 1

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
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
Region self()Returns `this`, for use in `with` statements.
cairo.types.Bool containsPoint(int x, int y)Checks whether (`x`, `y`) is contained in region.
cairo.types.RegionOverlap containsRectangle(cairo.types.RectangleInt rectangle)Checks whether rectangle is inside, outside or partially contained in region
cairo.region.Region copy()Allocates a new region object copying the area from original. Returns: A newly allocated #cairoregiont. Free with [cairo.region.Region.destroy]. This function always returns a valid pointer; if mem...
cairo.types.Bool equal(cairo.region.Region b)Compares whether regiona is equivalent to regionb. null as an argument is equal to itself, but not to any non-null region.
void getExtents(out cairo.types.RectangleInt extents)Gets the bounding rectangle of region as a #cairorectangleint_t
void getRectangle(int nth, out cairo.types.RectangleInt rectangle)Stores the nth rectangle from the region in rectangle.
cairo.types.Status intersect(cairo.region.Region other)Computes the intersection of dst with other and places the result in dst
cairo.types.Status intersectRectangle(cairo.types.RectangleInt rectangle)Computes the intersection of dst with rectangle and places the result in dst
cairo.types.Bool isEmpty()Checks whether region is empty. Returns: true if region is empty, false if it isn't.
int numRectangles()Returns the number of rectangles contained in region. Returns: The number of rectangles contained in region.
cairo.types.Status status()Checks 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)Subtracts other from dst and places the result in dst
cairo.types.Status subtractRectangle(cairo.types.RectangleInt rectangle)Subtracts rectangle from dst and places the result in dst
void translate(int dx, int dy)Translates region by (dx, dy).
cairo.types.Status union_(cairo.region.Region other)Computes the union of dst with other and places the result in dst
cairo.types.Status unionRectangle(cairo.types.RectangleInt rectangle)Computes the union of dst with rectangle and places the result in dst.
cairo.types.Status xor(cairo.region.Region other)Computes 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)Computes 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.
Constructors
this(void * ptr, Flag!"Take" take)