1 /* === S Y N F I G ========================================================= */
2 /*! \file layer_polygon.h
3 ** \brief Header file for implementation of the "Polygon" layer
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_LAYER_POLYGON_H
26 #define __SYNFIG_LAYER_POLYGON_H
28 /* === H E A D E R S ======================================================= */
30 #include "layer_shape.h"
36 /* === M A C R O S ========================================================= */
38 /* === T Y P E D E F S ===================================================== */
40 /* === C L A S S E S & S T R U C T S ======================================= */
44 /*! \class Layer_Polygon
46 ** \todo This layer needs to support multiple polygons */
47 class Layer_Polygon : public Layer_Shape
49 SYNFIG_LAYER_MODULE_EXT
54 std::vector< Point > vector_list;
64 //! Adds a polygon to the layer
65 /*! The edge data is automatically added to the
66 ** EdgeTable, so there is no need to call sync()
67 ** after adding a polygon using this function.
68 ** \param point_list A list containing the
69 ** points that define the polygon's parameter.
71 void add_polygon(const std::vector<Point> &point_list);
73 //! Clears out any polygon data
74 /*! Also clears out the EdgeTable, so there is no
75 ** need to call sync() after using this function.
79 //! Updates EdgeTable so it will reflect the parameter data
82 virtual bool set_param(const String & param, const synfig::ValueBase &value);
84 virtual ValueBase get_param(const String & param)const;
86 virtual Vocab get_param_vocab()const;
90 bool render_polyspan(Surface *surface,PolySpan &polyspan)const;
91 }; // END of Layer_Polygon
93 }; // END of namespace synfig
94 /* === E N D =============================================================== */