Region

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.

Members

Functions

containsPoint
cairo.types.Bool containsPoint(int x, int y)

Checks whether (x, y) is contained in region.

containsRectangle
cairo.types.RegionOverlap containsRectangle(cairo.rectangle_int.RectangleInt rectangle)

Checks whether rectangle is inside, outside or partially contained in region

copy
cairo.region.Region copy()

Allocates a new region object copying the area from original.

equal
cairo.types.Bool equal(cairo.region.Region b)

Compares whether region_a is equivalent to region_b. null as an argument is equal to itself, but not to any non-null region.

getExtents
void getExtents(cairo.rectangle_int.RectangleInt extents)

Gets the bounding rectangle of region as a #cairo_rectangle_int_t

getRectangle
void getRectangle(int nth, cairo.rectangle_int.RectangleInt rectangle)

Stores the nth rectangle from the region in rectangle.

intersect
cairo.types.Status intersect(cairo.region.Region other)

Computes the intersection of dst with other and places the result in dst

intersectRectangle
cairo.types.Status intersectRectangle(cairo.rectangle_int.RectangleInt rectangle)

Computes the intersection of dst with rectangle and places the result in dst

isEmpty
cairo.types.Bool isEmpty()

Checks whether region is empty.

numRectangles
int numRectangles()

Returns the number of rectangles contained in region.

status
cairo.types.Status status()

Checks whether an error has previous occurred for this region object.

subtract
cairo.types.Status subtract(cairo.region.Region other)

Subtracts other from dst and places the result in dst

subtractRectangle
cairo.types.Status subtractRectangle(cairo.rectangle_int.RectangleInt rectangle)

Subtracts rectangle from dst and places the result in dst

translate
void translate(int dx, int dy)

Translates region by (dx, dy).

unionRectangle
cairo.types.Status unionRectangle(cairo.rectangle_int.RectangleInt rectangle)

Computes the union of dst with rectangle and places the result in dst.

union_
cairo.types.Status union_(cairo.region.Region other)

Computes the union of dst with other and places the result in dst

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

xorRectangle
cairo.types.Status xorRectangle(cairo.rectangle_int.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.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.