Lumiera  0.pre.03
»edit your freedom«
rectangle.hpp
Go to the documentation of this file.
1 /*
2  RECTANGLE.hpp - utility functions for GDK rectangles
3 
4  Copyright (C) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program 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
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 * *****************************************************/
22 
23 
31 #ifndef STAGE_DRAW_RECTANGLE_H
32 #define STAGE_DRAW_RECTANGLE_H
33 
34 #include "stage/gtk-base.hpp"
35 
36 namespace stage {
37 namespace draw {
38 
40  bool pt_in_rect(Gdk::Point const& point, Gdk::Rectangle const& rect);
41 
42 
44  bool rects_overlap(Gdk::Rectangle const& a, Gdk::Rectangle const& b);
45 
46 
47 }}// namespace stage::draw
48 #endif /*STAGE_DRAW_RECTANGLE_H*/
bool rects_overlap(Gdk::Rectangle const &a, Gdk::Rectangle const &b)
determine whether two rectangles overlap
Definition: rectangle.cpp:50
bool pt_in_rect(const Gdk::Point &point, const Gdk::Rectangle &rect)
determine whether point is within the bounding box of a rectangle
Definition: rectangle.cpp:41
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
A set of basic GTK includes for the UI.