11.18Class GdkRectangle

GdkRectangle is a structure holding the position and size of a rectangle.

Class GdkRectangle( [x],[y],[width],[height] )
x the x coordinate of the left edge of the rectangle.
y the y coordinate of the top of the rectangle.
width the width of the rectangle.
height the height of the rectangle.

The intersection of two rectangles can be computed with gdk_rectangle_intersect(). To find the union of two rectangles use gdk_rectangle_union().

Properties
height the height of the rectangle.
width the width of the rectangle.
x the x coordinate of the left edge of the rectangle.
y the y coordinate of the top of the rectangle.
Methods
intersectCalculates the intersection of two rectangles.
unionCalculates the union of two rectangles.

Properties

height

the height of the rectangle.

the height of the rectangle.

width

the width of the rectangle.

the width of the rectangle.

x

the x coordinate of the left edge of the rectangle.

the x coordinate of the left edge of the rectangle.

y

the y coordinate of the top of the rectangle.

the y coordinate of the top of the rectangle.

Methods

intersect

Calculates the intersection of two rectangles.

GdkRectangle.intersect( src )
src a GdkRectangle
Returna GdkRectangle that is the intersection of this rectangle and the GdkRectangle specified by src.

If the rectangles do not intersect the returned GdkRectangle will have all attributes set to 0.

union

Calculates the union of two rectangles.

GdkRectangle.union( src )
src a GdkRectangle.
Returna GdkRectangle that is the smallest rectangle containing both this rectangle and the GdkRectangle specified by src.
Made with http://www.falconpl.org