X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Flayer_polygon.cpp;h=46efffd67f5d2813b58253ad82611714813fb408;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=a4dbfeb3ebad0dd3654fb96203f089e479085b5a;hpb=e8a065f2385c219c511b57dac52786120bfa097d;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/layer_polygon.cpp b/synfig-core/trunk/src/synfig/layer_polygon.cpp index a4dbfeb..46efffd 100644 --- a/synfig-core/trunk/src/synfig/layer_polygon.cpp +++ b/synfig-core/trunk/src/synfig/layer_polygon.cpp @@ -1,11 +1,12 @@ /* === S Y N F I G ========================================================= */ /*! \file layer_polygon.cpp -** \brief Template Header +** \brief Implementation of the "Polygon" layer ** -** $Id: layer_polygon.cpp,v 1.1.1.1 2005/01/04 01:23:14 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -56,10 +57,10 @@ using namespace etl; 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_LOCAL_NAME(Layer_Polygon,N_("Polygon")); +SYNFIG_LAYER_SET_CATEGORY(Layer_Polygon,N_("Geometry")); SYNFIG_LAYER_SET_VERSION(Layer_Polygon,"0.1"); -SYNFIG_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_SET_CVS_ID(Layer_Polygon,"$Id$"); /* === C L A S S E S ======================================================= */ @@ -93,7 +94,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])) @@ -106,7 +107,7 @@ Layer_Polygon::sync() } void -Layer_Polygon::add_polygon(const vector &point_list) +Layer_Polygon::add_polygon(const std::vector &point_list) { int i,pointcount=point_list.size(); @@ -118,7 +119,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])) @@ -135,11 +136,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(); @@ -147,7 +148,7 @@ Layer_Polygon::set_param(const String & param, const ValueBase &value) sync(); return true; } - + return Layer_Shape::set_param(param,value); } @@ -158,19 +159,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") + .set_origin("origin") ); - + return ret; }