kivio
diapathparser.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __DIAPATHPARSER_H__
00021 #define __DIAPATHPARSER_H__
00022
00023 #include "svgpathparser.h"
00024 #include <qvaluelist.h>
00025 #include <qdom.h>
00026
00027 class DiaPointFinder : public SVGPathParser
00028 {
00029 public:
00030 DiaPointFinder(QValueList<float> *xlist, QValueList<float> *ylist);
00031 void svgMoveTo( double x1, double y1, bool abs = true );
00032 void svgLineTo( double x1, double y1, bool abs = true );
00033 void svgCurveToCubic( double x1, double y1, double x2, double y2, double x3, double y3, bool abs = true );
00034 void svgClosePath();
00035
00036 private:
00037 QValueList<float> *m_xlist;
00038 QValueList<float> *m_ylist;
00039 };
00040
00041 class DiaPathParser : public SVGPathParser
00042 {
00043 public:
00044 DiaPathParser(QDomDocument *doc, QDomElement *shape, float xscale, float yscale, float lowestx, float lowesty);
00045
00046 void svgMoveTo( double x1, double y1, bool abs = true );
00047 void svgLineTo( double x1, double y1, bool abs = true );
00048 void svgCurveToCubic( double x1, double y1, double x2, double y2, double x3, double y3, bool abs = true );
00049 void svgClosePath();
00050
00051 private:
00052 float diaPointToKivio(float point, bool xpoint);
00053
00054 QDomDocument *m_doc;
00055 QDomElement *m_shape;
00056 float lastX;
00057 float lastY;
00058 float m_xscale;
00059 float m_yscale;
00060 float m_lowestx;
00061 float m_lowesty;
00062
00063 };
00064 #endif
|