1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gdk.Rectangle;
26 
27 private import gtkc.gdk;
28 public  import gtkc.gdktypes;
29 
30 
31 /**
32  * Defines the position and size of a rectangle. It is identical to
33  * #cairo_rectangle_int_t.
34  */
35 
36 /**
37  * Calculates the intersection of two rectangles. It is allowed for
38  * @dest to be the same as either @src1 or @src2. If the rectangles
39  * do not intersect, @dest’s width and height is set to 0 and its x
40  * and y values are undefined. If you are only interested in whether
41  * the rectangles intersect, but not in the intersecting area itself,
42  * pass %NULL for @dest.
43  *
44  * Params:
45  *     src2 = a #GdkRectangle
46  *     dest = return location for the
47  *         intersection of @src1 and @src2, or %NULL
48  *
49  * Return: %TRUE if the rectangles intersect.
50  */
51 public bool intersect(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest)
52 {
53 	return gdk_rectangle_intersect(src1, src2, &dest) != 0;
54 }
55 
56 /**
57  * Calculates the union of two rectangles.
58  * The union of rectangles @src1 and @src2 is the smallest rectangle which
59  * includes both @src1 and @src2 within it.
60  * It is allowed for @dest to be the same as either @src1 or @src2.
61  *
62  * Params:
63  *     src2 = a #GdkRectangle
64  *     dest = return location for the union of @src1 and @src2
65  */
66 public void unio(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest)
67 {
68 	gdk_rectangle_union(src1, src2, &dest);
69 }