Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef IWORKPATH_H_INCLUDED
00011 #define IWORKPATH_H_INCLUDED
00012
00013 #include "IWORKPath_fwd.h"
00014
00015 #include <string>
00016
00017 #include <glm/glm.hpp>
00018
00019 #include <librevenge/librevenge.h>
00020
00021 #include "libetonyek_utils.h"
00022
00023 namespace libetonyek
00024 {
00025
00026 class IWORKPath
00027 {
00028 friend bool approxEqual(const IWORKPath &left, const IWORKPath &right, const double eps);
00029
00030 public:
00031 struct Impl;
00032 struct InvalidException {};
00033
00034 public:
00035 IWORKPath();
00036 explicit IWORKPath(const std::string &path);
00037 IWORKPath(const IWORKPath &other);
00038 IWORKPath &operator=(const IWORKPath &other);
00039
00040 void swap(IWORKPath &other);
00041
00042 void clear();
00043
00044 void appendMoveTo(double x, double y);
00045 void appendLineTo(double x, double y);
00046 void appendCurveTo(double x1, double y1, double x2, double y2, double x, double y);
00047 void appendClose();
00048
00053 void operator*=(const glm::dmat3 &tr);
00054
00055
00056
00057
00058
00059 const std::string str() const;
00060
00063 void write(librevenge::RVNGPropertyListVector &vec) const;
00064
00065 private:
00066 boost::shared_ptr<Impl> m_impl;
00067 };
00068
00069 bool approxEqual(const IWORKPath &left, const IWORKPath &right, double eps = ETONYEK_EPSILON);
00070 bool operator==(const IWORKPath &left, const IWORKPath &right);
00071 bool operator!=(const IWORKPath &left, const IWORKPath &right);
00072
00079 IWORKPath operator*(const IWORKPath &path, const glm::dmat3 &tr);
00080
00081 }
00082
00083 #endif // IWORKPATH_H_INCLUDED
00084
00085