00001
00015 #include "ZincTypes.hpp"
00016
00017 #include <list>
00018 #include <tcl.h>
00019
00020 #ifndef ZINC_PATH
00021 #define ZINC_PATH
00022
00023 class ZincPath
00024 {
00025 double firstX, firstY;
00026 double lastX, lastY;
00027 Tcl_Obj* path;
00028
00035 inline void addPoint (double x, double y, bool c);
00036
00051 void convertFromSvg (double x0, double y0, double &rx, double &ry, double &phi,
00052 bool larcgeArc, bool sweep, double x, double y,
00053 double &cx, double &cy, double &theta, double &delta);
00054
00055
00056 public:
00062 ZincPath (double x, double y);
00063
00069 ~ZincPath ();
00070
00071
00072
00073
00077 void close ();
00078
00084 void lineTo (double x, double y);
00085
00094 void curveTo (double cx1, double cy1, double cx2, double cy2,
00095 double x, double y);
00096
00104 void cubicBezierTo (double cx1, double cy1, double cx2, double cy2,
00105 double x, double y);
00106
00114 void quadraticBezierTo (double cx, double cy, double x, double y);
00115
00126 void arcTo (double rx, double ry, double xAxisRotation, bool largeArc,
00127 bool sweepFlag, double x, double y);
00128
00135 Tcl_Obj* getTable ();
00136
00137 };
00138
00139 #endif
00140