X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_polygon.cpp;h=94de2b9beb7b7f55357754eb0acf639e032203b2;hb=47a6485b6c2602a8bce63cbf09ded0952566a70a;hp=7cd2e2c4ee0e2c94b767b579c7d9540cb623aa42;hpb=e3acc0b267b14fda5db3c7bbb2f218b993ef84b3;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_polygon.cpp b/synfig-core/trunk/src/synfig/layer_polygon.cpp index 7cd2e2c..94de2b9 100644 --- a/synfig-core/trunk/src/synfig/layer_polygon.cpp +++ b/synfig-core/trunk/src/synfig/layer_polygon.cpp @@ -1,20 +1,21 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file layer_polygon.cpp ** \brief Template Header ** -** $Id: layer_polygon.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package 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 +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ @@ -47,18 +48,18 @@ using std::deque; /* === U S I N G =========================================================== */ -using namespace sinfg; +using namespace synfig; using namespace std; using namespace etl; /* === G L O B A L S ======================================================= */ -SINFG_LAYER_INIT(Layer_Polygon); -SINFG_LAYER_SET_NAME(Layer_Polygon,"polygon"); -SINFG_LAYER_SET_LOCAL_NAME(Layer_Polygon,_("Polygon")); -SINFG_LAYER_SET_CATEGORY(Layer_Polygon,_("Geometry")); -SINFG_LAYER_SET_VERSION(Layer_Polygon,"0.1"); -SINFG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id: layer_polygon.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $"); +SYNFIG_LAYER_INIT(Layer_Polygon); +SYNFIG_LAYER_SET_NAME(Layer_Polygon,"polygon"); +SYNFIG_LAYER_SET_LOCAL_NAME(Layer_Polygon,_("Polygon")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Polygon,_("Geometry")); +SYNFIG_LAYER_SET_VERSION(Layer_Polygon,"0.1"); +SYNFIG_LAYER_SET_CVS_ID(Layer_Polygon,"$Id$"); /* === C L A S S E S ======================================================= */ @@ -92,7 +93,7 @@ Layer_Polygon::sync() // Build edge table move_to(vector_list[0][0],vector_list[0][1]); - + for(i = 1;i < pointcount; i++) { if(isnan(vector_list[i][0]) || isnan(vector_list[i][1])) @@ -117,7 +118,7 @@ Layer_Polygon::add_polygon(const vector &point_list) // Build edge table move_to(point_list[0][0],point_list[0][1]); - + for(i = 1;i < pointcount; i++) { if(isnan(point_list[i][0]) || isnan(point_list[i][1])) @@ -134,11 +135,11 @@ Layer_Polygon::clear() Layer_Shape::clear(); vector_list.clear(); } - + bool Layer_Polygon::set_param(const String & param, const ValueBase &value) { - if( param=="vector_list" && value.same_as(vector_list)) + if( param=="vector_list" && value.same_type_as(vector_list)) { vector_list=value; Layer_Shape::clear(); @@ -146,7 +147,7 @@ Layer_Polygon::set_param(const String & param, const ValueBase &value) sync(); return true; } - + return Layer_Shape::set_param(param,value); } @@ -157,19 +158,19 @@ Layer_Polygon::get_param(const String ¶m)const EXPORT_NAME(); EXPORT_VERSION(); - - return Layer_Shape::get_param(param); + + return Layer_Shape::get_param(param); } Layer::Vocab Layer_Polygon::get_param_vocab()const { Layer::Vocab ret(Layer_Shape::get_param_vocab()); - + ret.push_back(ParamDesc("vector_list") .set_local_name(_("Vector List")) .set_origin("offset") ); - + return ret; }