bezier-arrow.h
Go to the documentation of this file.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_BEZIER_ARROW_H
00026 #define GCCV_BEZIER_ARROW_H
00027
00028 #include "line-item.h"
00029 #include "structs.h"
00030
00033 namespace gccv {
00034
00040 class BezierArrow: public LineItem {
00041 public:
00048 BezierArrow (Canvas *canvas);
00056 BezierArrow (Group *parent, ItemClient *client = NULL);
00060 virtual ~BezierArrow ();
00061
00062
00070 double Distance (double x, double y, Item **item) const;
00077 void Draw (cairo_t *cr, bool is_vector) const;
00084 void Move (double x, double y);
00085
00086 protected:
00090 void UpdateBounds ();
00091
00092 public:
00106 void GetControlPoints (double &x0, double &y0, double &x1, double &y1, double &x2, double &y2, double &x3, double &y3);
00120 void SetControlPoints (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3);
00121
00130 GCCV_ITEM_POS_PROP (ArrowHeads, Head)
00139 GCCV_ITEM_POS_PROP (double, A)
00149 GCCV_ITEM_POS_PROP (double, B)
00158 GCCV_ITEM_POS_PROP (double, C)
00169 GCCV_ITEM_POS_PROP (bool, ShowControls)
00170
00171 private:
00172 Point m_Controls[4];
00173 };
00174
00175 }
00176
00177
00178 #endif // GCCV_BEZIER_ARROW_H