Package: gdk

GBoxed gdk:rectangle

Declaration

(glib:define-gboxed-cstruct rectangle "GdkRectangle"
  (:export t
   :type-initializer "gdk_rectangle_get_type")
  (x :int :initform 0)
  (y :int :initform 0)
  (width :int :initform 0)
  (height :int :initform 0))  

Values

x
The x coordinate of the top left corner.
y
The y coordinate of the top left corner.
width
The width of the rectangle.
height
The height of the rectangle.

Details

The gdk:rectangle structure is a data type for representing rectangles. The gdk:rectangle structure is identical to the cairo:rectangle-t structure. Together with the cairo:region-t data type of Cairo, these are the central types for representing sets of pixels.

The intersection of two rectangles can be computed with the gdk:rectangle-intersect function. To find the union of two rectangles use the gdk:rectangle-union function.

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.
 

Returned by

Slot Access Functions

See also

cairo:region-t
cairo:rectangle-t
2024-7-9