1 /* Copyright (C) 2002 The gtkmm Development Team
3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the Free
15 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 Rectangle::Rectangle()
23 gobject_.x = gobject_.y = 0;
24 gobject_.width = gobject_.height = 0;
27 Rectangle::Rectangle(int x, int y, int width, int height)
31 gobject_.width = width;
32 gobject_.height = height;
35 Rectangle::Rectangle(const PangoRectangle* src)
39 gobject_.width = src->width;
40 gobject_.height = src->height;
43 bool Rectangle::equal(const Rectangle& rhs) const
45 return (get_x() == rhs.get_x() && get_y() == rhs.get_y() &&
46 get_width() == rhs.get_width() && get_height() == rhs.get_height());
49 } /* namespace Pango */
55 Pango::Rectangle& wrap(PangoRectangle* object)
57 return *reinterpret_cast<Pango::Rectangle*>(object);
60 const Pango::Rectangle& wrap(const PangoRectangle* object)
62 return *reinterpret_cast<const Pango::Rectangle*>(object);
65 } /* namespace Glib */