Author: Carlos Lopez <[email protected]>
Date: Tue Aug 14 19:41:11 2012 +0200
Layer_Polygon: Add helper function to fill the vector list
---
synfig-core/src/synfig/layer_polygon.cpp | 12 ++++++++++++
synfig-core/src/synfig/layer_polygon.h | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/synfig-core/src/synfig/layer_polygon.cpp
b/synfig-core/src/synfig/layer_polygon.cpp
index 34af608..8beda10 100644
--- a/synfig-core/src/synfig/layer_polygon.cpp
+++ b/synfig-core/src/synfig/layer_polygon.cpp
@@ -134,6 +134,18 @@ Layer_Polygon::add_polygon(const std::vector<Point>
&point_list)
}
void
+Layer_Polygon::upload_polygon(const std::vector<Point> &point_list)
+{
+ vector_list.clear();
+ int i,pointcount=point_list.size();
+ for(i = 0;i < pointcount; i++)
+ {
+ vector_list.push_back(point_list[i]);
+ }
+
+}
+
+void
Layer_Polygon::clear()
{
Layer_Shape::clear();
diff --git a/synfig-core/src/synfig/layer_polygon.h
b/synfig-core/src/synfig/layer_polygon.h
index 8294648..eec4d42 100644
--- a/synfig-core/src/synfig/layer_polygon.h
+++ b/synfig-core/src/synfig/layer_polygon.h
@@ -69,6 +69,9 @@ public:
** points that define the polygon's parameter.
*/
void add_polygon(const std::vector<Point> &point_list);
+
+ // Places the point_list on the vector_list, for later render as
polygon.
+ void upload_polygon(const std::vector<Point> &point_list);
//! Clears out any polygon data
/*! Also clears out the EdgeTable, so there is no
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl