Gdk.Rectangle - Structures - Gdk 3.0 (original) (raw)
Fields¶
Name | Type | Access | Description |
---|---|---|---|
height | int | r/w | |
width | int | r/w | |
x | int | r/w | |
y | int | r/w |
Methods¶
equal (rect2) |
---|
intersect (src2) |
union (src2) |
Details¶
class Gdk.Rectangle¶
Defines the position and size of a rectangle. It is identical tocairo.RectangleInt.
Parameters:
rect2 (Gdk.Rectangle) – a Gdk.Rectangle
Returns:
True if the rectangles are equal.
Return type:
Checks if the two given rectangles are equal.
New in version 3.20.
Parameters:
src2 (Gdk.Rectangle) – a Gdk.Rectangle
Returns:
True if the rectangles intersect.
dest:
return location for the intersection of self and src2, or None
Return type:
(bool, dest: Gdk.Rectangle)
Calculates the intersection of two rectangles. It is allowed fordest to be the same as either self 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 None for dest.
Parameters:
src2 (Gdk.Rectangle) – a Gdk.Rectangle
Returns:
return location for the union of self and src2
Return type:
dest: Gdk.Rectangle
Calculates the union of two rectangles. The union of rectangles self and src2 is the smallest rectangle which includes both self and src2 within it. It is allowed for dest to be the same as either self or src2.
Note that this function does not ignore ‘empty’ rectangles (ie. with zero width or height).