KHTML
SVGPathSegCurvetoQuadratic.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 SVGPathSegCurvetoQuadratic_h
00024 #define SVGPathSegCurvetoQuadratic_h
00025
00026 #if ENABLE(SVG)
00027
00028 #include "SVGPathSeg.h"
00029
00030 namespace WebCore {
00031
00032 class SVGPathSegCurvetoQuadraticAbs : public SVGPathSeg {
00033 public:
00034 static PassRefPtr<SVGPathSegCurvetoQuadraticAbs> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticAbs(x, y, x1, y1)); }
00035 virtual ~SVGPathSegCurvetoQuadraticAbs();
00036
00037 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_ABS; }
00038 virtual String pathSegTypeAsLetter() const { return "Q"; }
00039 virtual String toString() const { return String::format("Q %.6lg %.6lg %.6lg %.6lg", m_x1, m_y1, 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 setX1(float);
00048 float x1() const;
00049
00050 void setY1(float);
00051 float y1() const;
00052
00053 private:
00054 SVGPathSegCurvetoQuadraticAbs(float x, float y, float x1, float y1);
00055
00056 float m_x;
00057 float m_y;
00058 float m_x1;
00059 float m_y1;
00060 };
00061
00062 class SVGPathSegCurvetoQuadraticRel : public SVGPathSeg {
00063 public:
00064 static PassRefPtr<SVGPathSegCurvetoQuadraticRel> create(float x, float y, float x1, float y1) { return adoptRef(new SVGPathSegCurvetoQuadraticRel(x, y, x1, y1)); }
00065 virtual ~SVGPathSegCurvetoQuadraticRel();
00066
00067 virtual unsigned short pathSegType() const { return PATHSEG_CURVETO_QUADRATIC_REL; }
00068 virtual String pathSegTypeAsLetter() const { return "q"; }
00069 virtual String toString() const { return String::format("q %.6lg %.6lg %.6lg %.6lg", m_x1, m_y1, 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 setX1(float);
00078 float x1() const;
00079
00080 void setY1(float);
00081 float y1() const;
00082
00083 private:
00084 SVGPathSegCurvetoQuadraticRel(float x, float y, float x1, float y1);
00085
00086 float m_x;
00087 float m_y;
00088 float m_x1;
00089 float m_y1;
00090 };
00091
00092 }
00093
00094 #endif // ENABLE(SVG)
00095 #endif
00096
00097