gdk.rectangle

Module for [Rectangle] struct

struct Rectangle

Types 1

structRectangle

A gtk.types.Rectangle data type for representing rectangles.

gtk.types.Rectangle is identical to cairo.types.Rectangle. Together with Cairo’s cairo.region.Region data type, these are the central types for representing sets of pixels.

The intersection of two rectangles can be computed with gdk.rectangle.Rectangle.intersect; to find the union of two rectangles use gdk.rectangle.Rectangle.union_.

The cairo.region.Region type provided by Cairo is usually used for managing non-rectangular clipping of graphical operations.

The Graphene library has a number of other data types for regions and volumes in 2D and 3D.

Fields
int xthe x coordinate of the top left corner
int ythe y coordinate of the top left corner
int widththe width of the rectangle
int heightthe height of the rectangle
Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
void * boxCopy() nothrow
bool containsPoint(int x, int y) nothrowReturns true if rect contains the point described by `x` and `y`.
bool equal(gdk.rectangle.Rectangle rect2) nothrowChecks if the two given rectangles are equal.
bool intersect(gdk.rectangle.Rectangle src2, out gdk.rectangle.Rectangle dest) nothrowCalculates the intersection of two rectangles.
void union_(gdk.rectangle.Rectangle src2, out gdk.rectangle.Rectangle dest) nothrowCalculates the union of two rectangles.