summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 42ba1b7)
raw | patch | inline | side by side (parent: 42ba1b7)
author | ishmal <ishmal@users.sourceforge.net> | |
Mon, 16 Jun 2008 16:58:11 +0000 (16:58 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Mon, 16 Jun 2008 16:58:11 +0000 (16:58 +0000) |
src/dom/svg2.h | patch | blob | history |
diff --git a/src/dom/svg2.h b/src/dom/svg2.h
index 0da3d861d220992da22df7f250a2dbc287d1fc06..4f9b78ecb56172a7cb7af4c6b36aeceab30bd0f5 100644 (file)
--- a/src/dom/svg2.h
+++ b/src/dom/svg2.h
class SVGDocument;\r
typedef Ptr<SVGDocument> SVGDocumentPtr;\r
\r
+//########################################################################\r
+//########################################################################\r
+//########################################################################\r
+//# I N T E R F A C E S\r
+//########################################################################\r
+//########################################################################\r
+//########################################################################\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGMatrix\r
+#########################################################################*/\r
+\r
+/**\r
+ * In SVG, a Matrix is defined like this:\r
+ *\r
+ * | a c e |\r
+ * | b d f |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+class SVGMatrix\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getA()\r
+ { return a; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setA(double val) throw (DOMException)\r
+ { a = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getB()\r
+ { return b; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setB(double val) throw (DOMException)\r
+ { b = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getC()\r
+ { return c; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setC(double val) throw (DOMException)\r
+ { c = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getD()\r
+ { return d; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setD(double val) throw (DOMException)\r
+ { d = val; }\r
+ /**\r
+ *\r
+ */\r
+ virtual double getE()\r
+ { return e; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setE(double val) throw (DOMException)\r
+ { e = val; }\r
+ /**\r
+ *\r
+ */\r
+ virtual double getF()\r
+ { return f; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setF(double val) throw (DOMException)\r
+ { f = val; }\r
+\r
+\r
+ /**\r
+ * Return the result of postmultiplying this matrix with another.\r
+ */\r
+ virtual SVGMatrix multiply(const SVGMatrix &other)\r
+ {\r
+ SVGMatrix result;\r
+ result.a = a * other.a + c * other.b;\r
+ result.b = b * other.a + d * other.b;\r
+ result.c = a * other.c + c * other.d;\r
+ result.d = b * other.c + d * other.d;\r
+ result.e = a * other.e + c * other.f + e;\r
+ result.f = b * other.e + d * other.f + f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Calculate the inverse of this matrix\r
+ *\r
+ */\r
+ virtual SVGMatrix inverse( ) throw( SVGException )\r
+ {\r
+ /*###########################################\r
+ The determinant of a 3x3 matrix E\r
+ (let's use our own notation for a bit)\r
+\r
+ A B C\r
+ D E F\r
+ G H I\r
+ is\r
+ AEI - AFH - BDI + BFG + CDH - CEG\r
+\r
+ Since in our affine transforms, G and H==0 and I==1,\r
+ this reduces to:\r
+ AE - BD\r
+ In SVG's naming scheme, that is: a * d - c * b . SIMPLE!\r
+\r
+ In a similar method of attack, SVG's adjunct matrix is:\r
+\r
+ d -c cf-ed\r
+ -b a eb-af\r
+ 0 0 ad-cb\r
+\r
+ To get the inverse matrix, we divide the adjunct matrix by\r
+ the determinant. Notice that (ad-cb)/(ad-cb)==1. Very cool.\r
+ So what we end up with is this:\r
+\r
+ a = d/(ad-cb) c = -c/(ad-cb) e = (cf-ed)/(ad-cb)\r
+ b = -b/(ad-cb) d = a/(ad-cb) f = (eb-af)/(ad-cb)\r
+\r
+ (Since this would be in all SVG-DOM implementations,\r
+ somebody needed to document this! ^^ )\r
+ #############################################*/\r
+\r
+ SVGMatrix result;\r
+ double determinant = a * d - c * b;\r
+ if (determinant < 1.0e-18)//invertible?\r
+ {\r
+ result.identity();//cop out\r
+ return result;\r
+ }\r
+\r
+ double idet = 1.0 / determinant;\r
+ result.a = d * idet;\r
+ result.b = -b * idet;\r
+ result.c = -c * idet;\r
+ result.d = a * idet;\r
+ result.e = (c*f - e*d) * idet;\r
+ result.f = (e*b - a*f) * idet;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | 1 0 x |\r
+ * | 0 1 y |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix translate(double x, double y )\r
+ {\r
+ SVGMatrix result;\r
+ result.a = a;\r
+ result.b = b;\r
+ result.c = c;\r
+ result.d = d;\r
+ result.e = a * x + c * y + e;\r
+ result.f = b * x + d * y + f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | scale 0 0 |\r
+ * | 0 scale 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix scale(double scale)\r
+ {\r
+ SVGMatrix result;\r
+ result.a = a * scale;\r
+ result.b = b * scale;\r
+ result.c = c * scale;\r
+ result.d = d * scale;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | scaleX 0 0 |\r
+ * | 0 scaleY 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix scaleNonUniform(double scaleX,\r
+ double scaleY )\r
+ {\r
+ SVGMatrix result;\r
+ result.a = a * scaleX;\r
+ result.b = b * scaleX;\r
+ result.c = c * scaleY;\r
+ result.d = d * scaleY;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | cos(a) -sin(a) 0 |\r
+ * | sin(a) cos(a) 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix rotate (double angle)\r
+ {\r
+ double sina = sin(angle);\r
+ double msina = -sina;\r
+ double cosa = cos(angle);\r
+ SVGMatrix result;\r
+ result.a = a * cosa + c * sina;\r
+ result.b = b * cosa + d + sina;\r
+ result.c = a * msina + c * cosa;\r
+ result.d = b * msina + d * cosa;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | cos(a) -sin(a) 0 |\r
+ * | sin(a) cos(a) 0 |\r
+ * | 0 0 1 |\r
+ * In this case, angle 'a' is computed as the artangent\r
+ * of the slope y/x . It is negative if the slope is negative.\r
+ */\r
+ virtual SVGMatrix rotateFromVector(double x, double y)\r
+ throw( SVGException )\r
+ {\r
+ double angle = atan(y / x);\r
+ if (y < 0.0)\r
+ angle = -angle;\r
+ SVGMatrix result;\r
+ double sina = sin(angle);\r
+ double msina = -sina;\r
+ double cosa = cos(angle);\r
+ result.a = a * cosa + c * sina;\r
+ result.b = b * cosa + d + sina;\r
+ result.c = a * msina + c * cosa;\r
+ result.d = b * msina + d * cosa;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | -1 0 0 |\r
+ * | 0 1 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix flipX( )\r
+ {\r
+ SVGMatrix result;\r
+ result.a = -a;\r
+ result.b = -b;\r
+ result.c = c;\r
+ result.d = d;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | 1 0 0 |\r
+ * | 0 -1 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix flipY( )\r
+ {\r
+ SVGMatrix result;\r
+ result.a = a;\r
+ result.b = b;\r
+ result.c = -c;\r
+ result.d = -d;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * | 1 tan(a) 0 |\r
+ * | 0 1 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix skewX(double angle)\r
+ {\r
+ double tana = tan(angle);\r
+ SVGMatrix result;\r
+ result.a = a;\r
+ result.b = b;\r
+ result.c = a * tana + c;\r
+ result.d = b * tana + d;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ * Equivalent to multiplying by:\r
+ * | 1 0 0 |\r
+ * | tan(a) 1 0 |\r
+ * | 0 0 1 |\r
+ *\r
+ */\r
+ virtual SVGMatrix skewY(double angle)\r
+ {\r
+ double tana = tan(angle);\r
+ SVGMatrix result;\r
+ result.a = a + c * tana;\r
+ result.b = b + d * tana;\r
+ result.c = c;\r
+ result.d = d;\r
+ result.e = e;\r
+ result.f = f;\r
+ return result;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGMatrix()\r
+ {\r
+ identity();\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGMatrix(double aArg, double bArg, double cArg,\r
+ double dArg, double eArg, double fArg )\r
+ {\r
+ a = aArg; b = bArg; c = cArg;\r
+ d = dArg; e = eArg; f = fArg;\r
+ }\r
+\r
+ /**\r
+ * Copy constructor\r
+ */\r
+ SVGMatrix(const SVGMatrix &other)\r
+ {\r
+ a = other.a;\r
+ b = other.b;\r
+ c = other.c;\r
+ d = other.d;\r
+ e = other.e;\r
+ f = other.f;\r
+ }\r
+\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGMatrix() {}\r
+\r
+protected:\r
+\r
+friend class SVGTransform;\r
+\r
+ /*\r
+ * Set to the identify matrix\r
+ */\r
+ void identity()\r
+ {\r
+ a = 1.0;\r
+ b = 0.0;\r
+ c = 0.0;\r
+ d = 1.0;\r
+ e = 0.0;\r
+ f = 0.0;\r
+ }\r
+\r
+ double a, b, c, d, e, f;\r
+\r
+};\r
+\r
+\r
+/*#########################################################################\r
+## SVGTransform\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGTransform\r
+{\r
+public:\r
+\r
+ /**\r
+ * Transform Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_TRANSFORM_UNKNOWN = 0,\r
+ SVG_TRANSFORM_MATRIX = 1,\r
+ SVG_TRANSFORM_TRANSLATE = 2,\r
+ SVG_TRANSFORM_SCALE = 3,\r
+ SVG_TRANSFORM_ROTATE = 4,\r
+ SVG_TRANSFORM_SKEWX = 5,\r
+ SVG_TRANSFORM_SKEWY = 6,\r
+ } TransformType;\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getType()\r
+ { return type; }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGMatrix getMatrix()\r
+ {\r
+ return matrix;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getAngle()\r
+ {\r
+ return angle;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setMatrix(const SVGMatrix &matrixArg)\r
+ {\r
+ type = SVG_TRANSFORM_MATRIX;\r
+ matrix = matrixArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setTranslate (double tx, double ty )\r
+ {\r
+ type = SVG_TRANSFORM_TRANSLATE;\r
+ matrix.setA(1.0);\r
+ matrix.setB(0.0);\r
+ matrix.setC(0.0);\r
+ matrix.setD(1.0);\r
+ matrix.setE(tx);\r
+ matrix.setF(ty);\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setScale (double sx, double sy )\r
+ {\r
+ type = SVG_TRANSFORM_SCALE;\r
+ matrix.setA(sx);\r
+ matrix.setB(0.0);\r
+ matrix.setC(0.0);\r
+ matrix.setD(sy);\r
+ matrix.setE(0.0);\r
+ matrix.setF(0.0);\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setRotate (double angleArg, double cx, double cy)\r
+ {\r
+ angle = angleArg;\r
+ setTranslate(cx, cy);\r
+ type = SVG_TRANSFORM_ROTATE;\r
+ matrix.rotate(angle);\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setSkewX (double angleArg)\r
+ {\r
+ angle = angleArg;\r
+ type = SVG_TRANSFORM_SKEWX;\r
+ matrix.identity();\r
+ matrix.skewX(angle);\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setSkewY (double angleArg)\r
+ {\r
+ angle = angleArg;\r
+ type = SVG_TRANSFORM_SKEWY;\r
+ matrix.identity();\r
+ matrix.skewY(angle);\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransform()\r
+ {\r
+ type = SVG_TRANSFORM_UNKNOWN;\r
+ angle = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransform(const SVGTransform &other)\r
+ {\r
+ type = other.type;\r
+ angle = other.angle;\r
+ matrix = other.matrix;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGTransform()\r
+ {}\r
+\r
+protected:\r
+\r
+ int type;\r
+ double angle;\r
+\r
+ SVGMatrix matrix;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGTransformList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGTransformList\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ { return items.size(); }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear( ) throw( DOMException )\r
+ { items.clear(); }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform initialize (const SVGTransform &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform getItem (unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGTransform transform;\r
+ return transform;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform insertItemBefore (const SVGTransform &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index > items.size())\r
+ items.push_back(newItem);\r
+ else\r
+ {\r
+ std::vector<SVGTransform>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform replaceItem (const SVGTransform &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGTransform transform;\r
+ return transform;\r
+ }\r
+ else\r
+ {\r
+ std::vector<SVGTransform>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform removeItem (unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGTransform transform;\r
+ return transform;\r
+ }\r
+ std::vector<SVGTransform>::iterator iter = items.begin() + index;\r
+ SVGTransform oldItem = *iter;\r
+ items.erase(iter);\r
+ return oldItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform appendItem (const SVGTransform &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform createSVGTransformFromMatrix(const SVGMatrix &matrix)\r
+ {\r
+ SVGTransform transform;\r
+ transform.setMatrix(matrix);\r
+ return transform;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransform consolidate()\r
+ {\r
+ SVGMatrix matrix;\r
+ for (unsigned int i=0 ; i<items.size() ; i++)\r
+ matrix = matrix.multiply(items[i].getMatrix());\r
+ SVGTransform transform;\r
+ transform.setMatrix(matrix);\r
+ items.clear();\r
+ items.push_back(transform);\r
+ return transform;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransformList()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransformList(const SVGTransformList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGTransformList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGTransform> items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedTransformList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedTransformList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransformList getBaseVal()\r
+ { return baseVal; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransformList getAnimVal()\r
+ { return animVal; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedTransformList()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedTransformList(const SVGAnimatedTransformList &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedTransformList() {}\r
+\r
+protected:\r
+\r
+ SVGTransformList baseVal;\r
+ SVGTransformList animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedBoolean\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedBoolean\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setBaseVal(bool val) throw (DOMException)\r
+ {\r
+ baseVal = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedBoolean()\r
+ {\r
+ baseVal = animVal = false;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedBoolean(const SVGAnimatedBoolean &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedBoolean() {}\r
+\r
+protected:\r
+\r
+ bool baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedString\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedString\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setBaseVal(const DOMString &val)\r
+ throw (DOMException)\r
+ {\r
+ baseVal = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedString()\r
+ {\r
+ baseVal = "";\r
+ animVal = "";\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedString(const SVGAnimatedString &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedString() {}\r
+\r
+protected:\r
+\r
+ DOMString baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGStringList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGStringList\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ {\r
+ return items.size();\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear () throw( DOMException )\r
+ {\r
+ items.clear();\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString initialize ( const DOMString& newItem )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getItem ( unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index >= items.size())\r
+ return "";\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString insertItemBefore ( const DOMString& newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ items.push_back(newItem);\r
+ }\r
+ else\r
+ {\r
+ std::vector<DOMString>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString replaceItem ( const DOMString& newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ return "";\r
+ std::vector<DOMString>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString removeItem ( unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ return "";\r
+ std::vector<DOMString>::iterator iter = items.begin() + index;\r
+ DOMString oldstr = *iter;\r
+ items.erase(iter);\r
+ return oldstr;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString appendItem ( const DOMString& newItem )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGStringList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGStringList(const SVGStringList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGStringList() {}\r
+\r
+protected:\r
+\r
+ std::vector<DOMString>items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedEnumeration\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedEnumeration\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setBaseVal(unsigned short val)\r
+ throw (DOMException)\r
+ {\r
+ baseVal = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedEnumeration()\r
+ {\r
+ baseVal = animVal = 0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedEnumeration(const SVGAnimatedEnumeration &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedEnumeration() {}\r
+\r
+protected:\r
+\r
+ int baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedInteger\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedInteger\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual long getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setBaseVal(long val) throw (DOMException)\r
+ {\r
+ baseVal = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual long getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedInteger()\r
+ { baseVal = animVal = 0L;}\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedInteger(long value)\r
+ {\r
+ baseVal = value;\r
+ animVal = 0L;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedInteger(long baseValArg, long animValArg)\r
+ {\r
+ baseVal = baseValArg;\r
+ animVal = animValArg;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedInteger(const SVGAnimatedInteger &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedInteger() {}\r
+\r
+protected:\r
+\r
+ long baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGNumber\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGNumber\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getValue()\r
+ {\r
+ return value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValue(double val) throw (DOMException)\r
+ {\r
+ value = val;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGNumber()\r
+ {\r
+ value = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGNumber(const SVGNumber &other)\r
+ {\r
+ value = other.value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGNumber() {}\r
+\r
+protected:\r
+\r
+ double value;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedNumber\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedNumber\r
+{\r
+public:\r
+\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setBaseVal(double val) throw (DOMException)\r
+ {\r
+ baseVal = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumber()\r
+ {\r
+ baseVal = animVal = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumber(double val)\r
+ {\r
+ baseVal = val;\r
+ animVal = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumber(double baseValArg, double animValArg)\r
+ {\r
+ baseVal = baseValArg;\r
+ animVal = animValArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumber(const SVGAnimatedNumber &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedNumber() {}\r
+\r
+protected:\r
+\r
+ double baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGNumberList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGNumberList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ {\r
+ return items.size();\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear() throw( DOMException )\r
+ {\r
+ items.clear();\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber initialize (const SVGNumber &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber getItem ( unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGNumber num;\r
+ return num;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber insertItemBefore ( const SVGNumber &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ items.push_back(newItem);\r
+ }\r
+ else\r
+ {\r
+ std::vector<SVGNumber>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber replaceItem ( const SVGNumber &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGNumber num;\r
+ return num;\r
+ }\r
+ std::vector<SVGNumber>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber removeItem ( unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGNumber num;\r
+ return num;\r
+ }\r
+ std::vector<SVGNumber>::iterator iter = items.begin() + index;\r
+ SVGNumber oldval = *iter;\r
+ items.erase(iter);\r
+ return oldval;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumber appendItem ( const SVGNumber &newItem )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGNumberList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGNumberList(const SVGNumberList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGNumberList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGNumber>items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedNumberList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedNumberList\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumberList &getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumberList &getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumberList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedNumberList(const SVGAnimatedNumberList &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedNumberList() {}\r
+\r
+protected:\r
+\r
+ SVGNumberList baseVal;\r
+ SVGNumberList animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGLength\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGLength\r
+{\r
+public:\r
+\r
+ /**\r
+ * Length Unit Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_LENGTHTYPE_UNKNOWN = 0,\r
+ SVG_LENGTHTYPE_NUMBER = 1,\r
+ SVG_LENGTHTYPE_PERCENTAGE = 2,\r
+ SVG_LENGTHTYPE_EMS = 3,\r
+ SVG_LENGTHTYPE_EXS = 4,\r
+ SVG_LENGTHTYPE_PX = 5,\r
+ SVG_LENGTHTYPE_CM = 6,\r
+ SVG_LENGTHTYPE_MM = 7,\r
+ SVG_LENGTHTYPE_IN = 8,\r
+ SVG_LENGTHTYPE_PT = 9,\r
+ SVG_LENGTHTYPE_PC = 10\r
+ } LengthUnitType;\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getUnitType( )\r
+ {\r
+ return unitType;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getValue( )\r
+ {\r
+ return value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValue( double val ) throw (DOMException)\r
+ {\r
+ value = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getValueInSpecifiedUnits( )\r
+ {\r
+ double result = 0.0;\r
+ //fill this in\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValueInSpecifiedUnits( double /*val*/ )\r
+ throw (DOMException)\r
+ {\r
+ //fill this in\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getValueAsString( )\r
+ {\r
+ DOMString ret;\r
+ char buf[32];\r
+ snprintf(buf, 31, "%f", value);\r
+ ret.append(buf);\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValueAsString( const DOMString& /*val*/ )\r
+ throw (DOMException)\r
+ {\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void newValueSpecifiedUnits ( unsigned short /*unitType*/, double /*val*/ )\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void convertToSpecifiedUnits ( unsigned short /*unitType*/ )\r
+ {\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLength()\r
+ {\r
+ unitType = SVG_LENGTHTYPE_UNKNOWN;\r
+ value = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLength(const SVGLength &other)\r
+ {\r
+ unitType = other.unitType;\r
+ value = other.value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGLength() {}\r
+\r
+protected:\r
+\r
+ int unitType;\r
+\r
+ double value;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedLength\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedLength\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength &getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength &getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedLength() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedLength(const SVGAnimatedLength &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedLength() {}\r
+\r
+protected:\r
+\r
+ SVGLength baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGLengthList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGLengthList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ {\r
+ return items.size();\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear ( ) throw( DOMException )\r
+ {\r
+ items.clear();\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength initialize (const SVGLength &newItem )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength getItem (unsigned long index)\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGLength ret;\r
+ return ret;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength insertItemBefore (const SVGLength &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ items.push_back(newItem);\r
+ }\r
+ else\r
+ {\r
+ std::vector<SVGLength>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength replaceItem (const SVGLength &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGLength ret;\r
+ return ret;\r
+ }\r
+ std::vector<SVGLength>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength removeItem (unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index>=items.size())\r
+ {\r
+ SVGLength ret;\r
+ return ret;\r
+ }\r
+ std::vector<SVGLength>::iterator iter = items.begin() + index;\r
+ SVGLength oldval = *iter;\r
+ items.erase(iter);\r
+ return oldval;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLength appendItem (const SVGLength &newItem )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLengthList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLengthList(const SVGLengthList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGLengthList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGLength>items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedLengthList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedLengthList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLengthList &getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGLengthList &getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedLengthList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedLengthList(const SVGAnimatedLengthList &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedLengthList() {}\r
+\r
+protected:\r
+\r
+ SVGLengthList baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAngle\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAngle\r
+{\r
+public:\r
+\r
+ /**\r
+ * Angle Unit Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_ANGLETYPE_UNKNOWN = 0,\r
+ SVG_ANGLETYPE_UNSPECIFIED = 1,\r
+ SVG_ANGLETYPE_DEG = 2,\r
+ SVG_ANGLETYPE_RAD = 3,\r
+ SVG_ANGLETYPE_GRAD = 4\r
+ } AngleUnitType;\r
+\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getUnitType()\r
+ {\r
+ return unitType;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getValue()\r
+ {\r
+ return value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValue(double val) throw (DOMException)\r
+ {\r
+ value = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getValueInSpecifiedUnits()\r
+ {\r
+ double result = 0.0;\r
+ //convert here\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValueInSpecifiedUnits(double /*val*/)\r
+ throw (DOMException)\r
+ {\r
+ //do conversion\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getValueAsString()\r
+ {\r
+ DOMString result;\r
+ char buf[32];\r
+ snprintf(buf, 31, "%f", value);\r
+ result.append(buf);\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setValueAsString(const DOMString &/*val*/)\r
+ throw (DOMException)\r
+ {\r
+ //convert here\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void newValueSpecifiedUnits (unsigned short /*unitType*/,\r
+ double /*valueInSpecifiedUnits*/ )\r
+ {\r
+ //convert here\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void convertToSpecifiedUnits (unsigned short /*unitType*/ )\r
+ {\r
+ //convert here\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAngle()\r
+ {\r
+ unitType = SVG_ANGLETYPE_UNKNOWN;\r
+ value = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAngle(const SVGAngle &other)\r
+ {\r
+ unitType = other.unitType;\r
+ value = other.value;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAngle() {}\r
+\r
+protected:\r
+\r
+ int unitType;\r
+\r
+ double value;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedAngle\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedAngle\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAngle getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAngle getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedAngle() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedAngle(const SVGAngle &angle)\r
+ { baseVal = angle; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedAngle(const SVGAnimatedAngle &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedAngle() {}\r
+\r
+protected:\r
+\r
+ SVGAngle baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGICCColor\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGICCColor\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getColorProfile()\r
+ {\r
+ return colorProfile;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setColorProfile(const DOMString &val) throw (DOMException)\r
+ {\r
+ colorProfile = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGNumberList &getColors()\r
+ {\r
+ return colors;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGICCColor() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGICCColor(const SVGICCColor &other)\r
+ {\r
+ colorProfile = other.colorProfile;\r
+ colors = other.colors;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGICCColor() {}\r
+\r
+protected:\r
+\r
+ DOMString colorProfile;\r
+\r
+ SVGNumberList colors;\r
+\r
+};\r
+\r
+\r
+/*#########################################################################\r
+## SVGColor\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGColor : virtual public css::CSSValue\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ * Color Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_COLORTYPE_UNKNOWN = 0,\r
+ SVG_COLORTYPE_RGBCOLOR = 1,\r
+ SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,\r
+ SVG_COLORTYPE_CURRENTCOLOR = 3\r
+ } ColorType;\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getColorType()\r
+ {\r
+ return colorType;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual css::RGBColor getRgbColor()\r
+ {\r
+ css::RGBColor col;\r
+ return col;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGICCColor getIccColor()\r
+ {\r
+ SVGICCColor col;\r
+ return col;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setRGBColor (const DOMString& /*rgbColor*/ )\r
+ throw( SVGException )\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setRGBColorICCColor (const DOMString& /*rgbColor*/,\r
+ const DOMString& /*iccColor*/ )\r
+ throw( SVGException )\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setColor (unsigned short /*colorType*/,\r
+ const DOMString& /*rgbColor*/,\r
+ const DOMString& /*iccColor*/ )\r
+ throw( SVGException )\r
+ {\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGColor()\r
+ {\r
+ colorType = SVG_COLORTYPE_UNKNOWN;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGColor(const SVGColor &other) : css::CSSValue(other)\r
+ {\r
+ colorType = other.colorType;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGColor() {}\r
+\r
+protected:\r
+\r
+ int colorType;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGRect\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGRect\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ {\r
+ return x;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ {\r
+ x = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ {\r
+ return y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ {\r
+ y = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getWidth()\r
+ {\r
+ return width;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setWidth(double val) throw (DOMException)\r
+ {\r
+ width = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getHeight()\r
+ {\r
+ return height;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setHeight(double val) throw (DOMException)\r
+ {\r
+ height = val;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGRect()\r
+ {\r
+ x = y = width = height = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGRect(const SVGRect &other)\r
+ {\r
+ x = other.x;\r
+ y = other.y;\r
+ width = other.width;\r
+ height = other.height;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGRect() {}\r
+\r
+protected:\r
+\r
+ double x, y, width, height;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedRect\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedRect\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGRect &getBaseVal()\r
+ {\r
+ return baseVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGRect &getAnimVal()\r
+ {\r
+ return animVal;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedRect()\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedRect(const SVGAnimatedRect &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ animVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedRect() {}\r
+\r
+protected:\r
+\r
+ SVGRect baseVal, animVal;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPoint\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPoint\r
+{\r
+public:\r
+\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint matrixTransform(const SVGMatrix &/*matrix*/)\r
+ {\r
+ SVGPoint point;\r
+ return point;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPoint()\r
+ { x = y = 0; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPoint(const SVGPoint &other)\r
+ {\r
+ x = other.x;\r
+ y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPoint() {}\r
+\r
+protected:\r
+\r
+ double x, y;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPointList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPointList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ { return items.size(); }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear() throw( DOMException )\r
+ { items.clear(); }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint initialize(const SVGPoint &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint getItem(unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPoint point;\r
+ return point;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint insertItemBefore(const SVGPoint &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index >= items.size())\r
+ items.push_back(newItem);\r
+ else\r
+ {\r
+ std::vector<SVGPoint>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint replaceItem(const SVGPoint &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPoint point;\r
+ return point;\r
+ }\r
+ std::vector<SVGPoint>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint removeItem(unsigned long index )\r
+ throw( DOMException )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPoint point;\r
+ return point;\r
+ }\r
+ std::vector<SVGPoint>::iterator iter = items.begin() + index;\r
+ SVGPoint oldItem = *iter;\r
+ items.erase(iter);\r
+ return oldItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint appendItem(const SVGPoint &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPointList() {}\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPointList(const SVGPointList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPointList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGPoint> items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGUnitTypes\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGUnitTypes\r
+{\r
+public:\r
+\r
+ /**\r
+ * Unit Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_UNIT_TYPE_UNKNOWN = 0,\r
+ SVG_UNIT_TYPE_USERSPACEONUSE = 1,\r
+ SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2\r
+ } UnitType;\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGUnitTypes() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGUnitTypes() {}\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGStylable\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGStylable\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedString getClassName()\r
+ {\r
+ return className;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual css::CSSStyleDeclaration getStyle()\r
+ {\r
+ return style;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual css::CSSValue getPresentationAttribute (const DOMString& /*name*/ )\r
+ {\r
+ css::CSSValue val;\r
+ //perform a lookup\r
+ return val;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGStylable() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGStylable(const SVGStylable &other)\r
+ {\r
+ className = other.className;\r
+ style = other.style;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGStylable() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedString className;\r
+ css::CSSStyleDeclaration style;\r
+\r
+};\r
+\r
+\r
+/*#########################################################################\r
+## SVGLocatable\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGLocatable\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementPtr getNearestViewportElement()\r
+ {\r
+ SVGElementPtr result;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementPtr getFarthestViewportElement()\r
+ {\r
+ SVGElementPtr result;\r
+ return result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGRect getBBox ( )\r
+ {\r
+ return bbox;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGMatrix getCTM ( )\r
+ {\r
+ return ctm;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGMatrix getScreenCTM ( )\r
+ {\r
+ return screenCtm;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGMatrix getTransformToElement (const SVGElement &/*element*/)\r
+ throw( SVGException )\r
+ {\r
+ SVGMatrix result;\r
+ //do calculations\r
+ return result;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLocatable() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLocatable(const SVGLocatable &/*other*/)\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGLocatable() {}\r
+\r
+protected:\r
+\r
+ SVGRect bbox;\r
+ SVGMatrix ctm;\r
+ SVGMatrix screenCtm;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGTransformable\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGTransformable : public SVGLocatable\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedTransformList &getTransform()\r
+ {\r
+ return transforms;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransformable() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTransformable(const SVGTransformable &other) : SVGLocatable(other)\r
+ {\r
+ transforms = other.transforms;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGTransformable() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedTransformList transforms;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGTests\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGTests\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGStringList &getRequiredFeatures()\r
+ {\r
+ return requiredFeatures;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGStringList &getRequiredExtensions()\r
+ {\r
+ return requiredExtensions;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGStringList &getSystemLanguage()\r
+ {\r
+ return systemLanguage;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool hasExtension (const DOMString& /*extension*/ )\r
+ {\r
+ return false;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTests() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGTests(const SVGTests &other)\r
+ {\r
+ requiredFeatures = other.requiredFeatures;\r
+ requiredExtensions = other.requiredExtensions;\r
+ systemLanguage = other.systemLanguage;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGTests() {}\r
+\r
+protected:\r
+\r
+ SVGStringList requiredFeatures;\r
+ SVGStringList requiredExtensions;\r
+ SVGStringList systemLanguage;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGLangSpace\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGLangSpace\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getXmllang()\r
+ {\r
+ return xmlLang;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setXmllang(const DOMString &val)\r
+ throw (DOMException)\r
+ {\r
+ xmlLang = val;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getXmlspace()\r
+ {\r
+ return xmlSpace;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setXmlspace(const DOMString &val)\r
+ throw (DOMException)\r
+ {\r
+ xmlSpace = val;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLangSpace() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGLangSpace(const SVGLangSpace &other)\r
+ {\r
+ xmlLang = other.xmlLang;\r
+ xmlSpace = other.xmlSpace;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGLangSpace() {}\r
+\r
+protected:\r
+\r
+ DOMString xmlLang;\r
+ DOMString xmlSpace;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGExternalResourcesRequired\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGExternalResourcesRequired\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedBoolean getExternalResourcesRequired()\r
+ { return required; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGExternalResourcesRequired()\r
+ { }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other)\r
+ {\r
+ required = other.required;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGExternalResourcesRequired() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedBoolean required;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPreserveAspectRatio\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPreserveAspectRatio\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ * Alignment Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,\r
+ SVG_PRESERVEASPECTRATIO_NONE = 1,\r
+ SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,\r
+ SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,\r
+ SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,\r
+ SVG_PRESERVEASPECTRATIO_XMINYMID = 5,\r
+ SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,\r
+ SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,\r
+ SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,\r
+ SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,\r
+ SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10\r
+ } AlignmentType;\r
+\r
+\r
+ /**\r
+ * Meet-or-slice Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_MEETORSLICE_UNKNOWN = 0,\r
+ SVG_MEETORSLICE_MEET = 1,\r
+ SVG_MEETORSLICE_SLICE = 2\r
+ } MeetOrSliceType;\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getAlign()\r
+ { return align; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setAlign(unsigned short val) throw (DOMException)\r
+ { align = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getMeetOrSlice()\r
+ { return meetOrSlice; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setMeetOrSlice(unsigned short val) throw (DOMException)\r
+ { meetOrSlice = val; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPreserveAspectRatio()\r
+ {\r
+ align = SVG_PRESERVEASPECTRATIO_UNKNOWN;\r
+ meetOrSlice = SVG_MEETORSLICE_UNKNOWN;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPreserveAspectRatio(const SVGPreserveAspectRatio &other)\r
+ {\r
+ align = other.align;\r
+ meetOrSlice = other.meetOrSlice;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPreserveAspectRatio() {}\r
+\r
+protected:\r
+\r
+ unsigned short align;\r
+ unsigned short meetOrSlice;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedPreserveAspectRatio\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedPreserveAspectRatio\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPreserveAspectRatio getBaseVal()\r
+ { return baseVal; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPreserveAspectRatio getAnimVal()\r
+ { return animVal; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPreserveAspectRatio() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPreserveAspectRatio(const SVGAnimatedPreserveAspectRatio &other)\r
+ {\r
+ baseVal = other.baseVal;\r
+ baseVal = other.animVal;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedPreserveAspectRatio() {}\r
+\r
+protected:\r
+\r
+ SVGPreserveAspectRatio baseVal;\r
+ SVGPreserveAspectRatio animVal;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGFitToViewBox\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGFitToViewBox\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedRect getViewBox()\r
+ { return viewBox; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedPreserveAspectRatio getPreserveAspectRatio()\r
+ { return preserveAspectRatio; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGFitToViewBox()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+\r
+ SVGFitToViewBox(const SVGFitToViewBox &other)\r
+ {\r
+ viewBox = other.viewBox;\r
+ preserveAspectRatio = other.preserveAspectRatio;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGFitToViewBox() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedRect viewBox;\r
+\r
+ SVGAnimatedPreserveAspectRatio preserveAspectRatio;\r
+\r
+};\r
+\r
+\r
+/*#########################################################################\r
+## SVGZoomAndPan\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGZoomAndPan\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ * Zoom and Pan Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_ZOOMANDPAN_UNKNOWN = 0,\r
+ SVG_ZOOMANDPAN_DISABLE = 1,\r
+ SVG_ZOOMANDPAN_MAGNIFY = 2\r
+ } ZoomAndPanType;\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getZoomAndPan()\r
+ { return zoomAndPan; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setZoomAndPan(unsigned short val) throw (DOMException)\r
+ { zoomAndPan = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGZoomAndPan()\r
+ { zoomAndPan = SVG_ZOOMANDPAN_UNKNOWN; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGZoomAndPan(const SVGZoomAndPan &other)\r
+ { zoomAndPan = other.zoomAndPan; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGZoomAndPan() {}\r
+\r
+protected:\r
+\r
+ unsigned short zoomAndPan;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGViewSpec\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGViewSpec : public SVGZoomAndPan,\r
+ public SVGFitToViewBox\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGTransformList getTransform()\r
+ { return transform; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementPtr getViewTarget()\r
+ { return viewTarget; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getViewBoxString()\r
+ {\r
+ DOMString ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getPreserveAspectRatioString()\r
+ {\r
+ DOMString ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getTransformString()\r
+ {\r
+ DOMString ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getViewTargetString()\r
+ {\r
+ DOMString ret;\r
+ return ret;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGViewSpec()\r
+ {\r
+ viewTarget = NULL;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGViewSpec(const SVGViewSpec &other) : SVGZoomAndPan(other), SVGFitToViewBox(other)\r
+ {\r
+ viewTarget = other.viewTarget;\r
+ transform = other.transform;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGViewSpec() {}\r
+\r
+protected:\r
+\r
+ SVGElementPtr viewTarget;\r
+ SVGTransformList transform;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGURIReference\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGURIReference\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedString getHref()\r
+ { return href; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGURIReference() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGURIReference(const SVGURIReference &other)\r
+ {\r
+ href = other.href;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGURIReference() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedString href;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGCSSRule\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGCSSRule : public css::CSSRule\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ * Additional CSS RuleType to support ICC color specifications\r
+ */\r
+ typedef enum\r
+ {\r
+ COLOR_PROFILE_RULE = 7\r
+ } ColorProfileRuleType;\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGCSSRule()\r
+ { type = COLOR_PROFILE_RULE; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGCSSRule(const SVGCSSRule &other) : css::CSSRule(other)\r
+ { type = COLOR_PROFILE_RULE; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGCSSRule() {}\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGRenderingIntent\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGRenderingIntent\r
+{\r
+public:\r
+\r
+ /**\r
+ * Rendering Intent Types\r
+ */\r
+ typedef enum\r
+ {\r
+ RENDERING_INTENT_UNKNOWN = 0,\r
+ RENDERING_INTENT_AUTO = 1,\r
+ RENDERING_INTENT_PERCEPTUAL = 2,\r
+ RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,\r
+ RENDERING_INTENT_SATURATION = 4,\r
+ RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5\r
+ } RenderingIntentType;\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGRenderingIntent()\r
+ {\r
+ renderingIntentType = RENDERING_INTENT_UNKNOWN;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGRenderingIntent(const SVGRenderingIntent &other)\r
+ {\r
+ renderingIntentType = other.renderingIntentType;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGRenderingIntent() {}\r
+\r
+protected:\r
+\r
+ unsigned short renderingIntentType;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+###########################################################################\r
+## P A T H S E G M E N T S\r
+###########################################################################\r
+#########################################################################*/\r
+\r
+static char const *const pathSegLetters[] =\r
+{\r
+ "@", // PATHSEG_UNKNOWN,\r
+ "z", // PATHSEG_CLOSEPATH\r
+ "M", // PATHSEG_MOVETO_ABS\r
+ "m", // PATHSEG_MOVETO_REL,\r
+ "L", // PATHSEG_LINETO_ABS\r
+ "l", // PATHSEG_LINETO_REL\r
+ "C", // PATHSEG_CURVETO_CUBIC_ABS\r
+ "c", // PATHSEG_CURVETO_CUBIC_REL\r
+ "Q", // PATHSEG_CURVETO_QUADRATIC_ABS,\r
+ "q", // PATHSEG_CURVETO_QUADRATIC_REL\r
+ "A", // PATHSEG_ARC_ABS\r
+ "a", // PATHSEG_ARC_REL,\r
+ "H", // PATHSEG_LINETO_HORIZONTAL_ABS,\r
+ "h", // PATHSEG_LINETO_HORIZONTAL_REL\r
+ "V", // PATHSEG_LINETO_VERTICAL_ABS\r
+ "v", // PATHSEG_LINETO_VERTICAL_REL\r
+ "S", // PATHSEG_CURVETO_CUBIC_SMOOTH_ABS\r
+ "s", // PATHSEG_CURVETO_CUBIC_SMOOTH_REL\r
+ "T", // PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS\r
+ "t" // PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL\r
+};\r
+\r
+/*#########################################################################\r
+## SVGPathSeg\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSeg\r
+{\r
+public:\r
+\r
+\r
+\r
+ /**\r
+ * Path Segment Types\r
+ */\r
+ typedef enum\r
+ {\r
+ PATHSEG_UNKNOWN = 0,\r
+ PATHSEG_CLOSEPATH = 1,\r
+ PATHSEG_MOVETO_ABS = 2,\r
+ PATHSEG_MOVETO_REL = 3,\r
+ PATHSEG_LINETO_ABS = 4,\r
+ PATHSEG_LINETO_REL = 5,\r
+ PATHSEG_CURVETO_CUBIC_ABS = 6,\r
+ PATHSEG_CURVETO_CUBIC_REL = 7,\r
+ PATHSEG_CURVETO_QUADRATIC_ABS = 8,\r
+ PATHSEG_CURVETO_QUADRATIC_REL = 9,\r
+ PATHSEG_ARC_ABS = 10,\r
+ PATHSEG_ARC_REL = 11,\r
+ PATHSEG_LINETO_HORIZONTAL_ABS = 12,\r
+ PATHSEG_LINETO_HORIZONTAL_REL = 13,\r
+ PATHSEG_LINETO_VERTICAL_ABS = 14,\r
+ PATHSEG_LINETO_VERTICAL_REL = 15,\r
+ PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16,\r
+ PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17,\r
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18,\r
+ PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19\r
+ } PathSegmentType;\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getPathSegType()\r
+ { return type; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getPathSegTypeAsLetter()\r
+ {\r
+ int typ = type;\r
+ if (typ<0 || typ>PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL)\r
+ typ = PATHSEG_UNKNOWN;\r
+ char const *ch = pathSegLetters[typ];\r
+ DOMString letter = ch;\r
+ return letter;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSeg()\r
+ { type = PATHSEG_UNKNOWN; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSeg(const SVGPathSeg &other)\r
+ {\r
+ type = other.type;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSeg() {}\r
+\r
+protected:\r
+\r
+ int type;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegClosePath\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegClosePath : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegClosePath()\r
+ {\r
+ type = PATHSEG_CLOSEPATH;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegClosePath(const SVGPathSegClosePath &other) : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CLOSEPATH;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegClosePath() {}\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegMovetoAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegMovetoAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoAbs()\r
+ {\r
+ type = PATHSEG_MOVETO_ABS;\r
+ x = y = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoAbs(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_MOVETO_ABS;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoAbs(const SVGPathSegMovetoAbs &other) : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_MOVETO_ABS;\r
+ x = other.x; y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegMovetoAbs() {}\r
+\r
+protected:\r
+\r
+ double x,y;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegMovetoRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegMovetoRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoRel()\r
+ {\r
+ type = PATHSEG_MOVETO_REL;\r
+ x = y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoRel(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_MOVETO_REL;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegMovetoRel(const SVGPathSegMovetoRel &other) : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_MOVETO_REL;\r
+ x = other.x; y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegMovetoRel() {}\r
+\r
+protected:\r
+\r
+ double x,y;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoAbs()\r
+ {\r
+ type = PATHSEG_LINETO_ABS;\r
+ x = y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoAbs(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_LINETO_ABS;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoAbs(const SVGPathSegLinetoAbs &other) : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_ABS;\r
+ x = other.x; y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoAbs() {}\r
+\r
+protected:\r
+\r
+ double x,y;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoRel()\r
+ {\r
+ type = PATHSEG_LINETO_REL;\r
+ x = y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoRel(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_LINETO_REL;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoRel(const SVGPathSegLinetoRel &other) : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_REL;\r
+ x = other.x; y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoRel() {}\r
+\r
+protected:\r
+\r
+ double x,y;\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoCubicAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoCubicAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX1()\r
+ { return x1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX1(double val) throw (DOMException)\r
+ { x1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY1()\r
+ { return y1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY1(double val) throw (DOMException)\r
+ { y1 = val; }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX2()\r
+ { return x2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX2(double val) throw (DOMException)\r
+ { x2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY2()\r
+ { return y2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY2(double val) throw (DOMException)\r
+ { y2 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicAbs()\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_ABS;\r
+ x = y = x1 = y1 = x2 = y2 = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicAbs(double xArg, double yArg,\r
+ double x1Arg, double y1Arg,\r
+ double x2Arg, double y2Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_ABS;\r
+ x = xArg; y = yArg;\r
+ x1 = x1Arg; y1 = y1Arg;\r
+ x2 = x2Arg; y2 = y2Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicAbs(const SVGPathSegCurvetoCubicAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_ABS;\r
+ x = other.x; y = other.y;\r
+ x1 = other.x1; y1 = other.y1;\r
+ x2 = other.x2; y2 = other.y2;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoCubicAbs() {}\r
+\r
+protected:\r
+\r
+ double x, y, x1, y1, x2, y2;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoCubicRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoCubicRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX1()\r
+ { return x1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX1(double val) throw (DOMException)\r
+ { x1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY1()\r
+ { return y1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY1(double val) throw (DOMException)\r
+ { y1 = val; }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX2()\r
+ { return x2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX2(double val) throw (DOMException)\r
+ { x2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY2()\r
+ { return y2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY2(double val) throw (DOMException)\r
+ { y2 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicRel()\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_REL;\r
+ x = y = x1 = y1 = x2 = y2 = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicRel(double xArg, double yArg,\r
+ double x1Arg, double y1Arg,\r
+ double x2Arg, double y2Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_REL;\r
+ x = xArg; y = yArg;\r
+ x1 = x1Arg; y1 = y1Arg;\r
+ x2 = x2Arg; y2 = y2Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicRel(const SVGPathSegCurvetoCubicRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_REL;\r
+ x = other.x; y = other.y;\r
+ x1 = other.x1; y1 = other.y1;\r
+ x2 = other.x2; y2 = other.y2;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoCubicRel() {}\r
+\r
+protected:\r
+\r
+ double x, y, x1, y1, x2, y2;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoQuadraticAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoQuadraticAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX1()\r
+ { return x1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX1(double val) throw (DOMException)\r
+ { x1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY1()\r
+ { return y1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY1(double val) throw (DOMException)\r
+ { y1 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticAbs()\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_ABS;\r
+ x = y = x1 = y1 = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticAbs(double xArg, double yArg,\r
+ double x1Arg, double y1Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_ABS;\r
+ x = xArg; y = yArg;\r
+ x1 = x1Arg; y1 = y1Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticAbs(const SVGPathSegCurvetoQuadraticAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_ABS;\r
+ x = other.x; y = other.y;\r
+ x1 = other.x1; y1 = other.y1;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoQuadraticAbs() {}\r
+\r
+protected:\r
+\r
+ double x, y, x1, y1;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoQuadraticRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoQuadraticRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX1()\r
+ { return x1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX1(double val) throw (DOMException)\r
+ { x1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY1()\r
+ { return y1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY1(double val) throw (DOMException)\r
+ { y1 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticRel()\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_REL;\r
+ x = y = x1 = y1 = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticRel(double xArg, double yArg,\r
+ double x1Arg, double y1Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_REL;\r
+ x = xArg; y = yArg;\r
+ x1 = x1Arg; y1 = y1Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticRel(const SVGPathSegCurvetoQuadraticRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_REL;\r
+ x = other.x; y = other.y;\r
+ x1 = other.x1; y1 = other.y1;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoQuadraticRel() {}\r
+\r
+protected:\r
+\r
+ double x, y, x1, y1;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegArcAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegArcAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getR1()\r
+ { return r1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setR1(double val) throw (DOMException)\r
+ { r1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getR2()\r
+ { return r2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setR2(double val) throw (DOMException)\r
+ { r2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getAngle()\r
+ { return angle; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setAngle(double val) throw (DOMException)\r
+ { angle = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getLargeArcFlag()\r
+ { return largeArcFlag; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setLargeArcFlag(bool val) throw (DOMException)\r
+ { largeArcFlag = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getSweepFlag()\r
+ { return sweepFlag; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setSweepFlag(bool val) throw (DOMException)\r
+ { sweepFlag = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcAbs()\r
+ {\r
+ type = PATHSEG_ARC_ABS;\r
+ x = y = r1 = r2 = angle = 0.0;\r
+ largeArcFlag = sweepFlag = false;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcAbs(double xArg, double yArg,\r
+ double r1Arg, double r2Arg,\r
+ double angleArg,\r
+ bool largeArcFlagArg,\r
+ bool sweepFlagArg )\r
+\r
+ {\r
+ type = PATHSEG_ARC_ABS;\r
+ x = xArg; y = yArg;\r
+ r1 = r1Arg; r2 = r2Arg;\r
+ angle = angleArg;\r
+ largeArcFlag = largeArcFlagArg;\r
+ sweepFlag = sweepFlagArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcAbs(const SVGPathSegArcAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_ARC_ABS;\r
+ x = other.x; y = other.y;\r
+ r1 = other.r1; r2 = other.r2;\r
+ angle = other.angle;\r
+ largeArcFlag = other.largeArcFlag;\r
+ sweepFlag = other.sweepFlag;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegArcAbs() {}\r
+\r
+protected:\r
+\r
+ double x, y, r1, r2, angle;\r
+ bool largeArcFlag;\r
+ bool sweepFlag;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegArcRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegArcRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getR1()\r
+ { return r1; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setR1(double val) throw (DOMException)\r
+ { r1 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getR2()\r
+ { return r2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setR2(double val) throw (DOMException)\r
+ { r2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getAngle()\r
+ { return angle; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setAngle(double val) throw (DOMException)\r
+ { angle = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getLargeArcFlag()\r
+ { return largeArcFlag; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setLargeArcFlag(bool val) throw (DOMException)\r
+ { largeArcFlag = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual bool getSweepFlag()\r
+ { return sweepFlag; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setSweepFlag(bool val) throw (DOMException)\r
+ { sweepFlag = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcRel()\r
+ {\r
+ type = PATHSEG_ARC_REL;\r
+ x = y = r1 = r2 = angle = 0.0;\r
+ largeArcFlag = sweepFlag = false;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcRel(double xArg, double yArg,\r
+ double r1Arg, double r2Arg,\r
+ double angleArg,\r
+ bool largeArcFlagArg,\r
+ bool sweepFlagArg )\r
+\r
+ {\r
+ type = PATHSEG_ARC_REL;\r
+ x = xArg; y = yArg;\r
+ r1 = r1Arg; r2 = r2Arg;\r
+ angle = angleArg;\r
+ largeArcFlag = largeArcFlagArg;\r
+ sweepFlag = sweepFlagArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegArcRel(const SVGPathSegArcRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_ARC_REL;\r
+ x = other.x; y = other.y;\r
+ r1 = other.r1; r2 = other.r2;\r
+ angle = other.angle;\r
+ largeArcFlag = other.largeArcFlag;\r
+ sweepFlag = other.sweepFlag;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegArcRel() {}\r
+\r
+protected:\r
+\r
+ double x, y, r1, r2, angle;\r
+ bool largeArcFlag;\r
+ bool sweepFlag;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoHorizontalAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoHorizontalAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalAbs()\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_ABS;\r
+ x = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalAbs(double xArg)\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_ABS;\r
+ x = xArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalAbs(const SVGPathSegLinetoHorizontalAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_ABS;\r
+ x = other.x;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoHorizontalAbs() {}\r
+\r
+protected:\r
+\r
+ double x;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoHorizontalRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoHorizontalRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalRel()\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_REL;\r
+ x = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalRel(double xArg)\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_REL;\r
+ x = xArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoHorizontalRel(const SVGPathSegLinetoHorizontalRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_HORIZONTAL_REL;\r
+ x = other.x;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoHorizontalRel() {}\r
+\r
+protected:\r
+\r
+ double x;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoVerticalAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoVerticalAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalAbs()\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_ABS;\r
+ y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalAbs(double yArg)\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_ABS;\r
+ y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalAbs(const SVGPathSegLinetoVerticalAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_ABS;\r
+ y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoVerticalAbs() {}\r
+\r
+protected:\r
+\r
+ double y;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegLinetoVerticalRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegLinetoVerticalRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalRel()\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_REL;\r
+ y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalRel(double yArg)\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_REL;\r
+ y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegLinetoVerticalRel(const SVGPathSegLinetoVerticalRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_LINETO_VERTICAL_REL;\r
+ y = other.y;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegLinetoVerticalRel() {}\r
+\r
+protected:\r
+\r
+ double y;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoCubicSmoothAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX2()\r
+ { return x2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX2(double val) throw (DOMException)\r
+ { x2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY2()\r
+ { return y2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY2(double val) throw (DOMException)\r
+ { y2 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothAbs()\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\r
+ x = y = x2 = y2 = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothAbs(double xArg, double yArg,\r
+ double x2Arg, double y2Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\r
+ x = xArg; y = yArg;\r
+ x2 = x2Arg; y2 = y2Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothAbs(const SVGPathSegCurvetoCubicSmoothAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;\r
+ x = other.x; y = other.y;\r
+ x2 = other.x2; y2 = other.y2;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoCubicSmoothAbs() {}\r
+\r
+protected:\r
+\r
+ double x, y, x2, y2;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoCubicSmoothRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX2()\r
+ { return x2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX2(double val) throw (DOMException)\r
+ { x2 = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY2()\r
+ { return y2; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY2(double val) throw (DOMException)\r
+ { y2 = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothRel()\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\r
+ x = y = x2 = y2 = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothRel(double xArg, double yArg,\r
+ double x2Arg, double y2Arg)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\r
+ x = xArg; y = yArg;\r
+ x2 = x2Arg; y2 = y2Arg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoCubicSmoothRel(const SVGPathSegCurvetoCubicSmoothRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;\r
+ x = other.x; y = other.y;\r
+ x2 = other.x2; y2 = other.y2;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoCubicSmoothRel() {}\r
+\r
+protected:\r
+\r
+ double x, y, x2, y2;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoQuadraticSmoothAbs\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoQuadraticSmoothAbs : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothAbs()\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\r
+ x = y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothAbs(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothAbs(const SVGPathSegCurvetoQuadraticSmoothAbs &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;\r
+ x = y = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoQuadraticSmoothAbs() {}\r
+\r
+protected:\r
+\r
+ double x, y;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegCurvetoQuadraticSmoothRel\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegCurvetoQuadraticSmoothRel : public SVGPathSeg\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setX(double val) throw (DOMException)\r
+ { x = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setY(double val) throw (DOMException)\r
+ { y = val; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothRel()\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\r
+ x = y = 0.0;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothRel(double xArg, double yArg)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\r
+ x = xArg; y = yArg;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegCurvetoQuadraticSmoothRel(const SVGPathSegCurvetoQuadraticSmoothRel &other)\r
+ : SVGPathSeg(other)\r
+ {\r
+ type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;\r
+ x = y = 0.0;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegCurvetoQuadraticSmoothRel() {}\r
+\r
+protected:\r
+\r
+ double x, y;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPathSegList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPathSegList\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getNumberOfItems()\r
+ { return items.size(); }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void clear () throw( DOMException )\r
+ { items.clear(); }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg initialize (const SVGPathSeg &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.clear();\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg getItem (unsigned long index)\r
+ throw( DOMException )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPathSeg seg;\r
+ return seg;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg insertItemBefore(const SVGPathSeg &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index >= items.size())\r
+ items.push_back(newItem);\r
+ else\r
+ {\r
+ std::vector<SVGPathSeg>::iterator iter = items.begin() + index;\r
+ items.insert(iter, newItem);\r
+ }\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg replaceItem(const SVGPathSeg &newItem,\r
+ unsigned long index )\r
+ throw( DOMException, SVGException )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPathSeg seg;\r
+ return seg;\r
+ }\r
+ std::vector<SVGPathSeg>::iterator iter = items.begin() + index;\r
+ *iter = newItem;\r
+ return newItem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg removeItem (unsigned long index)\r
+ throw (DOMException)\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGPathSeg seg;\r
+ return seg;\r
+ }\r
+ std::vector<SVGPathSeg>::iterator iter = items.begin() + index;\r
+ SVGPathSeg olditem = *iter;\r
+ items.erase(iter);\r
+ return olditem;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSeg appendItem (const SVGPathSeg &newItem)\r
+ throw( DOMException, SVGException )\r
+ {\r
+ items.push_back(newItem);\r
+ return newItem;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegList() {}\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPathSegList(const SVGPathSegList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPathSegList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGPathSeg> items;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedPathData\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedPathData\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSegList getPathSegList()\r
+ {\r
+ SVGPathSegList list;\r
+ return list;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSegList getNormalizedPathSegList()\r
+ {\r
+ SVGPathSegList list;\r
+ return list;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSegList getAnimatedPathSegList()\r
+ {\r
+ SVGPathSegList list;\r
+ return list;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPathSegList getAnimatedNormalizedPathSegList()\r
+ {\r
+ SVGPathSegList list;\r
+ return list;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPathData()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPathData(const SVGAnimatedPathData &/*other*/)\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedPathData() {}\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGAnimatedPoints\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGAnimatedPoints\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPointList getPoints()\r
+ { return points; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPointList getAnimatedPoints()\r
+ { return animatedPoints; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPoints() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGAnimatedPoints(const SVGAnimatedPoints &other)\r
+ {\r
+ points = other.points;\r
+ animatedPoints = other.animatedPoints;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGAnimatedPoints() {}\r
+\r
+protected:\r
+\r
+ SVGPointList points;\r
+ SVGPointList animatedPoints;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGPaint\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGPaint : public SVGColor\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ * Paint Types\r
+ */\r
+ typedef enum\r
+ {\r
+ SVG_PAINTTYPE_UNKNOWN = 0,\r
+ SVG_PAINTTYPE_RGBCOLOR = 1,\r
+ SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,\r
+ SVG_PAINTTYPE_NONE = 101,\r
+ SVG_PAINTTYPE_CURRENTCOLOR = 102,\r
+ SVG_PAINTTYPE_URI_NONE = 103,\r
+ SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,\r
+ SVG_PAINTTYPE_URI_RGBCOLOR = 105,\r
+ SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,\r
+ SVG_PAINTTYPE_URI = 107\r
+ } PaintType;\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getPaintType()\r
+ { return paintType; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getUri()\r
+ { return uri; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setUri (const DOMString& uriArg )\r
+ { uri = uriArg; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setPaint (unsigned short paintTypeArg,\r
+ const DOMString& uriArg,\r
+ const DOMString& /*rgbColor*/,\r
+ const DOMString& /*iccColor*/ )\r
+ throw( SVGException )\r
+ {\r
+ paintType = paintTypeArg;\r
+ uri = uriArg;\r
+ //do something with rgbColor\r
+ //do something with iccColor;\r
+ }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPaint()\r
+ {\r
+ uri = "";\r
+ paintType = SVG_PAINTTYPE_UNKNOWN;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGPaint(const SVGPaint &other) : css::CSSValue(other), SVGColor(other)\r
+ {\r
+ uri = "";\r
+ paintType = SVG_PAINTTYPE_UNKNOWN;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGPaint() {}\r
+\r
+protected:\r
+\r
+ unsigned int paintType;\r
+ DOMString uri;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGColorProfileRule\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGColorProfileRule : public SVGCSSRule,\r
+ public SVGRenderingIntent\r
+{\r
+\r
+public:\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getSrc()\r
+ { return src; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setSrc(const DOMString &val) throw (DOMException)\r
+ { src = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual DOMString getName()\r
+ { return name; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setName(const DOMString &val) throw (DOMException)\r
+ { name = val; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned short getRenderingIntent()\r
+ { return renderingIntent; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual void setRenderingIntent(unsigned short val) throw (DOMException)\r
+ { renderingIntent = val; }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGColorProfileRule() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGColorProfileRule(const SVGColorProfileRule &other)\r
+ : SVGCSSRule(other), SVGRenderingIntent(other)\r
+ {\r
+ renderingIntent = other.renderingIntent;\r
+ src = other.src;\r
+ name = other.name;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGColorProfileRule() {}\r
+\r
+protected:\r
+\r
+ unsigned short renderingIntent;\r
+ DOMString src;\r
+ DOMString name;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGFilterPrimitiveStandardAttributes\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGFilterPrimitiveStandardAttributes : public SVGStylable\r
+{\r
+public:\r
+\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedLength getX()\r
+ { return x; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedLength getY()\r
+ { return y; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedLength getWidth()\r
+ { return width; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedLength getHeight()\r
+ { return height; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGAnimatedString getResult()\r
+ { return result; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGFilterPrimitiveStandardAttributes()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes &other)\r
+ : SVGStylable(other)\r
+ {\r
+ x = other.x;\r
+ y = other.y;\r
+ width = other.width;\r
+ height = other.height;\r
+ result = other.result;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGFilterPrimitiveStandardAttributes() {}\r
+\r
+protected:\r
+\r
+ SVGAnimatedLength x;\r
+ SVGAnimatedLength y;\r
+ SVGAnimatedLength width;\r
+ SVGAnimatedLength height;\r
+ SVGAnimatedString result;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGEvent\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGEvent : events::Event\r
+{\r
+public:\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGEvent() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGEvent(const SVGEvent &other) : events::Event(other)\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGEvent() {}\r
+\r
+};\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGZoomEvent\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGZoomEvent : events::UIEvent\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGRect getZoomRectScreen()\r
+ { return zoomRectScreen; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getPreviousScale()\r
+ { return previousScale; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint getPreviousTranslate()\r
+ { return previousTranslate; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual double getNewScale()\r
+ { return newScale; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGPoint getNewTranslate()\r
+ { return newTranslate; }\r
+\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGZoomEvent()\r
+ {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGZoomEvent(const SVGZoomEvent &other) : events::Event(other),\r
+ events::UIEvent(other)\r
+ {\r
+ zoomRectScreen = other.zoomRectScreen;\r
+ previousScale = other.previousScale;\r
+ previousTranslate = other.previousTranslate;\r
+ newScale = other.newScale;\r
+ newTranslate = other.newTranslate;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGZoomEvent() {}\r
+\r
+protected:\r
+\r
+ SVGRect zoomRectScreen;\r
+ double previousScale;\r
+ SVGPoint previousTranslate;\r
+ double newScale;\r
+ SVGPoint newTranslate;\r
+\r
+};\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGElementInstance\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGElementInstance : public events::EventTarget\r
+{\r
+public:\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementPtr getCorrespondingElement()\r
+ { return correspondingElement; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGUseElementPtr getCorrespondingUseElement()\r
+ { return correspondingUseElement; }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance getParentNode()\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ * Since we are using stack types and this is a circular definition,\r
+ * we will instead implement this as a global function below:\r
+ * SVGElementInstanceList getChildNodes(const SVGElementInstance instance);\r
+ */\r
+ //virtual SVGElementInstanceList getChildNodes();\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance getFirstChild()\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance getLastChild()\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance getPreviousSibling()\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance getNextSibling()\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGElementInstance() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGElementInstance(const SVGElementInstance &other)\r
+ : events::EventTarget(other)\r
+ {\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGElementInstance() {}\r
+\r
+protected:\r
+\r
+ SVGElementPtr correspondingElement;\r
+ SVGUseElementPtr correspondingUseElement;\r
+\r
+};\r
+\r
+\r
+\r
+\r
+\r
+\r
+/*#########################################################################\r
+## SVGElementInstanceList\r
+#########################################################################*/\r
+\r
+/**\r
+ *\r
+ */\r
+class SVGElementInstanceList\r
+{\r
+public:\r
+\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual unsigned long getLength()\r
+ { return items.size(); }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual SVGElementInstance item (unsigned long index )\r
+ {\r
+ if (index >= items.size())\r
+ {\r
+ SVGElementInstance ret;\r
+ return ret;\r
+ }\r
+ return items[index];\r
+ }\r
+\r
+ /**\r
+ * This static method replaces the circular definition of:\r
+ * SVGElementInstanceList SVGElementInstance::getChildNodes()\r
+ *\r
+ */\r
+ static SVGElementInstanceList getChildNodes(const SVGElementInstance &/*instance*/)\r
+ {\r
+ SVGElementInstanceList list;\r
+ return list;\r
+ }\r
+\r
+\r
+ //##################\r
+ //# Non-API methods\r
+ //##################\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGElementInstanceList() {}\r
+\r
+ /**\r
+ *\r
+ */\r
+ SVGElementInstanceList(const SVGElementInstanceList &other)\r
+ {\r
+ items = other.items;\r
+ }\r
+\r
+ /**\r
+ *\r
+ */\r
+ virtual ~SVGElementInstanceList() {}\r
+\r
+protected:\r
+\r
+ std::vector<SVGElementInstance> items;\r
+\r
+\r
+};\r
+\r
+\r
+/**\r
+ * This is a helper class that will hold several types of data. It will\r
+ * be used in those situations where methods are common to different \r
+ * interfaces, except for the data type.\r
+ */ \r
+class SVGValue\r
+{\r
+public:\r
+\r
+ typedef enum\r
+ {\r
+ SVG_DOUBLE,\r
+ SVG_INT,\r
+ SVG_STRING\r
+ }SVGValueType;\r
+\r
+ SVGValue(long v)\r
+ {\r
+ init();\r
+ ival = d;\r
+ type = SVG_INT;\r
+ }\r
+ \r
+ SVGValue(double v)\r
+ {\r
+ init();\r
+ dval = v;\r
+ type = SVG_DOUBLE;\r
+ }\r
+ \r
+ SVGValue(const DOMString &v)\r
+ {\r
+ init();\r
+ sval = v;\r
+ type = SVG_STRING;\r
+ }\r
+ \r
+ SVGValue(const SVGValue &other)\r
+ {\r
+ assign(other);\r
+ }\r
+ \r
+ SVGValue &operator=(const SVGValue &other)\r
+ {\r
+ assign(other);\r
+ return *this;\r
+ }\r
+ \r
+ SVGValue &operator=(long v)\r
+ {\r
+ init();\r
+ ival = v;\r
+ type = SVG_INT;\r
+ return *this;\r
+ }\r
+ \r
+ SVGValue &operator=(double v)\r
+ {\r
+ init();\r
+ ival = v;\r
+ type = SVG_DOUBLE;\r
+ return *this;\r
+ }\r
+ \r
+ SVGValue &operator=(const DOMString &v)\r
+ {\r
+ init();\r
+ sval = v;\r
+ type = SVG_STRING;\r
+ return *this;\r
+ }\r
+ \r
+ ~SVGValue()\r
+ {}\r
+ \r
+ long intValue()\r
+ { return ival; }\r
+\r
+ double doubleValue()\r
+ { return ival; }\r
+\r
+ DOMString &stringValue()\r
+ { return sval; }\r
+\r
+\r
+private:\r
+\r
+ void init()\r
+ {\r
+ type = SVG_DOUBLE;\r
+ ival = 0;\r
+ dval = 0.0; \r
+ sval = "";\r
+ }\r
+ \r
+ void assign(const SVGValue &other)\r
+ {\r
+ type = other.type;\r
+ ival = other.ival;\r
+ dval = other.dval;\r
+ sval = other.sval;\r
+ }\r
+ \r
+ int type;\r
+ double dval;\r
+ long ival;\r
+ DOMString sval;\r
+\r
+};\r
+\r
+\r
+\r
+//########################################################################\r
+//########################################################################\r
+//########################################################################\r
+//# D O M\r
+//########################################################################\r
+//########################################################################\r
+//########################################################################\r
+\r
+\r
+\r
+\r
+\r
/*#########################################################################\r
## Types\r
#########################################################################*/\r