Class (GI Struct)

Gdk-3.0GdkRectangle

Defines the position and size of a rectangle. It is identical to cairo.RectangleInt.

Index

Constructors

Properties

Methods

Constructors

  • Parameters

    • Optionalproperties: Partial<{ height: number; width: number; x: number; y: number }>

    Returns Gdk.Rectangle

Properties

height: number
width: number
x: number
y: number

Methods

  • 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, dest’s 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.

    Parameters

    Returns [boolean, Gdk.Rectangle]

    true if the rectangles intersect.

  • Calculates the union of two rectangles. The union of rectangles src1 and src2 is the smallest rectangle which includes both src1 and src2 within it. It is allowed for dest to be the same as either src1 or src2.

    Note that this function does not ignore 'empty' rectangles (ie. with zero width or height).

    Parameters

    Returns Gdk.Rectangle