Basics
Guides
API Reference
Basics
Guides
API Reference
[12:14] static extends: object
Generated struct layout helper for GIR record Rectangle.
layout ()
Returns the Panama struct layout for
Rectangle.
[37:7] extends: object
Represents a rectangle. GdkRectangle is identical to cairo_rectangle_t.
Together with Cairo’s cairo_region_t data type, these are the central types
for representing sets of pixels. The intersection of two rectangles can be
computed with [method@Gdk.Rectangle.intersect]; to find the union of two
rectangles use [method@Gdk.Rectangle.union]. The cairo_region_t 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.
GdkRectangle (Handle = null)
Creates a new
Rectangleby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.contains_point (int x, int y)
Returns %TRUE if @rect contains the point described by @x and @y.
x is X coordinate.y is Y coordinate.%TRUE if @rect contains the point.equal (object rect2)
Checks if the two given rectangles are equal.
rect2 is a GdkRectangle.%TRUE if the rectangles are equal..intersect (object src2)
Calculates the intersection of two rectangles. It is allowed for @dest to be the same as either @src1 or @src2. If the rectangles do not intersect,
width and height is set to 0 and its x and y values are undefined. If you are only interested in whether the rectangles intersect, but not in the intersecting area itself, pass %NULL for @dest.src2 is a GdkRectangle.dest is return location for the intersection of @src1 and @src2.%TRUE if the rectangles intersect..union (object src2)
Calculates the union of two rectangles. The union of rectangles @src1 and
is the smallest rectangle which includes both @src1 and @src2 within it. It is allowed for @dest to be the same as either @src1 orNote that this function does not ignore 'empty' rectangles (ie. with zero width or height).src2 is a GdkRectangle.dest is return location for the union of @src1 and @src2.None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.