KHTML
SVGPathSegCurvetoCubicSmooth.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 #ifndef SVGPathSegCurvetoCubicSmooth_h
00024 #define SVGPathSegCurvetoCubicSmooth_h
00025
00026 #if ENABLE(SVG)
00027
00028 #include "SVGPathSeg.h"
00029
00030 namespace WebCore {
00031
00032 class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSeg {
00033 public:
00034 static PassRefPtr<SVGPathSegCurvetoCubicSmoothAbs> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2)); }
00035 virtual ~SVGPathSegCurvetoCubicSmoothAbs();
00036
00037 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; }
00038 virtual String pathSegTypeAsLetter() const { return "S"; }
00039 virtual String toString() const { return String::format("S %.6lg %.6lg %.6lg %.6lg", m_x2, m_y2, m_x, m_y); }
00040
00041 void setX(float);
00042 float x() const;
00043
00044 void setY(float);
00045 float y() const;
00046
00047 void setX2(float);
00048 float x2() const;
00049
00050 void setY2(float);
00051 float y2() const;
00052
00053 private:
00054 SVGPathSegCurvetoCubicSmoothAbs(float x, float y, float x2, float y2);
00055
00056 float m_x;
00057 float m_y;
00058 float m_x2;
00059 float m_y2;
00060 };
00061
00062 class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSeg {
00063 public:
00064 static PassRefPtr<SVGPathSegCurvetoCubicSmoothRel> create(float x, float y, float x2, float y2) { return adoptRef(new SVGPathSegCurvetoCubicSmoothRel(x, y, x2, y2)); }
00065 virtual ~SVGPathSegCurvetoCubicSmoothRel();
00066
00067 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_CUBIC_SMOOTH_REL; }
00068 virtual String pathSegTypeAsLetter() const { return "s"; }
00069 virtual String toString() const { return String::format("s %.6lg %.6lg %.6lg %.6lg", m_x2, m_y2, m_x, m_y); }
00070
00071 void setX(float);
00072 float x() const;
00073
00074 void setY(float);
00075 float y() const;
00076
00077 void setX2(float);
00078 float x2() const;
00079
00080 void setY2(float);
00081 float y2() const;
00082
00083 private:
00084 SVGPathSegCurvetoCubicSmoothRel(float x, float y, float x2, float y2);
00085
00086 float m_x;
00087 float m_y;
00088 float m_x2;
00089 float m_y2;
00090 };
00091
00092 }
00093
00094 #endif // ENABLE(SVG)
00095 #endif
00096
00097