/* Copyright (C) 1998-2006 The gtkmm Development Team
 *
 * 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 2.1 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 this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */


#include <goocanvaspolyline.h>

_PINCLUDE(goocanvasmm/private/itemsimple_p.h)

namespace Goocanvas
{

Polyline::Polyline(bool close_path, const Points& points )
:
  _CONSTRUCT("close_path", close_path ? TRUE : FALSE)
{
#ifdef GLIBMM_PROPERTIES_ENABLED
  property_points() = points ;
#else
  set_property("points", points);
#endif
}

Polyline::Polyline(double x1, double y1, double x2, double y2)
:
   _CONSTRUCT("close_path", FALSE )
{
  double data[4] = {x1, y1, x2, y2};
  Goocanvas::Points points(2, data);

#ifdef GLIBMM_PROPERTIES_ENABLED
  property_points() = points ;
#else
  set_property("points", points);
#endif
}

} //namespace Goocanvas

