1 /* $Id: rectangle.hg,v 1.2 2004/01/05 17:32:12 murrayc Exp $ */
5 * Copyright (C) 1998-2002 The gtkmm Development Team
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 /** Gdk::Rectangle is a structure holding the position and size of a rectangle.
30 * The intersection of two rectangles can be computed with intersect(). To find the union of two rectangles use union().
34 _CLASS_BOXEDTYPE_STATIC(Rectangle, GdkRectangle)
36 //_CUSTOM_DEFAULT_CTOR
38 Rectangle(int x, int y, int width, int height);
40 Rectangle& join(const Rectangle& src2);
41 Rectangle& intersect(const Rectangle& src2);
42 Rectangle& intersect(const Rectangle& src2, bool& rectangles_intersect);
44 bool has_zero_area() const;
46 _MEMBER_GET(x, x, int, int)
47 _MEMBER_SET(x, x, int, int)
48 _MEMBER_GET(y, y, int, int)
49 _MEMBER_SET(y, y, int, int)
50 _MEMBER_GET(width, width, int, int)
51 _MEMBER_SET(width, width, int, int)
52 _MEMBER_GET(height, height, int, int)
53 _MEMBER_SET(height, height, int, int)