// Generated by gtkmmproc -- DO NOT MODIFY!


#include <geglmm/rectangle.h>
#include <geglmm/private/rectangle_p.h>

/* libgeglmm - a C++ wrapper for libgegl
 *
 * (c) 2008 Hubert Figuiere
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
 */


#include <gegl.h>


namespace Gegl {

	Rectangle::Rectangle(const GeglRectangle & rect)
	{
		*gobj() = rect;
	}

}

namespace
{
} // anonymous namespace


namespace Glib
{

Gegl::Rectangle& wrap(GeglRectangle* object)
{
  return *reinterpret_cast<Gegl::Rectangle*>(object);
}

const Gegl::Rectangle& wrap(const GeglRectangle* object)
{
  return *reinterpret_cast<const Gegl::Rectangle*>(object);
}

} // namespace Glib


namespace Gegl
{


// static
GType Rectangle::get_type()
{
  return gegl_rectangle_get_type();
}

Rectangle::Rectangle()
{
  GLIBMM_INITIALIZE_STRUCT(gobject_, GeglRectangle);
}

Rectangle::Rectangle(const GeglRectangle* gobject)
{
  if(gobject)
    gobject_ = *gobject;
  else
    GLIBMM_INITIALIZE_STRUCT(gobject_, GeglRectangle);
}


void Rectangle::set(int x, int y, guint witdth, guint height)
{
gegl_rectangle_set(gobj(), x, y, witdth, height); 
}

bool Rectangle::equal(const Rectangle & s) const
{
  return gegl_rectangle_equal(const_cast<GeglRectangle*>(gobj()), const_cast<const GeglRectangle*>(s.gobj()));
}

bool Rectangle::equal_coords(int x, int y, int width, int heght) const
{
  return gegl_rectangle_equal_coords(const_cast<GeglRectangle*>(gobj()), x, y, width, heght);
}

bool Rectangle::is_empty() const
{
  return gegl_rectangle_is_empty(const_cast<GeglRectangle*>(gobj()));
}

void Rectangle::copy(const Rectangle & from)
{
gegl_rectangle_copy(gobj(), const_cast<const GeglRectangle*>(from.gobj())); 
}

void Rectangle::bounding_box(const Rectangle & src1, const Rectangle & src2)
{
gegl_rectangle_bounding_box(gobj(), const_cast<const GeglRectangle*>(src1.gobj()), const_cast<const GeglRectangle*>(src2.gobj())); 
}

bool Rectangle::intersect(const Rectangle & src1, const Rectangle & src2)
{
  return gegl_rectangle_intersect(gobj(), const_cast<const GeglRectangle*>(src1.gobj()), const_cast<const GeglRectangle*>(src2.gobj()));
}

bool Rectangle::contains(const Rectangle & s) const
{
  return gegl_rectangle_contains(const_cast<GeglRectangle*>(gobj()), const_cast<const GeglRectangle*>(s.gobj()));
}

bool Rectangle::is_infinite_plane() const
{
  return gegl_rectangle_is_infinite_plane(const_cast<GeglRectangle*>(gobj()));
}

void Rectangle::dump() const
{
gegl_rectangle_dump(const_cast<GeglRectangle*>(gobj())); 
}


} // namespace Gegl


