poly-line.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef GCCV_POLY_LINE_H
00026 #define GCCV_POLY_LINE_H
00027
00028 #include "line-item.h"
00029 #include "structs.h"
00030 #include <list>
00031
00032 namespace gccv {
00033
00034 class PolyLine: public LineItem
00035 {
00036 public:
00037 PolyLine (Canvas *canvas, std::list <Point> &points);
00038 PolyLine (Group *parent, std::list <Point> &points, ItemClient *client = NULL);
00039 virtual ~PolyLine ();
00040
00041 void SetPoints (std::list <Point> &points);
00042
00043
00044 double Distance (double x, double y, Item **item) const;
00045 void Draw (cairo_t *cr, bool is_vector) const;
00046 void UpdateBounds ();
00047 void Move (double x, double y);
00048
00049 protected:
00050 std::list <Point> m_Points;
00051 };
00052
00053 }
00054
00055 #endif // GCCV_POLY_LINE_H