00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_LAYER_POLYGON_H
00026 #define __SYNFIG_LAYER_POLYGON_H
00027
00028
00029
00030 #include "layer_shape.h"
00031 #include "color.h"
00032 #include "vector.h"
00033 #include <list>
00034 #include <vector>
00035
00036
00037
00038
00039
00040
00041
00042 namespace synfig {
00043
00047 class Layer_Polygon : public Layer_Shape
00048 {
00049 SYNFIG_LAYER_MODULE_EXT
00050
00051 private:
00052
00053
00054 std::vector< Point > vector_list;
00055
00056 protected:
00057
00058 Layer_Polygon();
00059
00060 public:
00061
00062 ~Layer_Polygon();
00063
00065
00071 void add_polygon(const std::vector<Point> &point_list);
00072
00074
00077 void clear();
00078
00080 void sync();
00081
00082 virtual bool set_param(const String & param, const synfig::ValueBase &value);
00083
00084 virtual ValueBase get_param(const String & param)const;
00085
00086 virtual Vocab get_param_vocab()const;
00087
00088 private:
00089 class PolySpan;
00090 bool render_polyspan(Surface *surface,PolySpan &polyspan)const;
00091 };
00092
00093 };
00094
00095
00096 #endif