5
* Phoebe DOM Implementation.
7
* This is a C++ approximation of the W3C DOM model, which follows
8
* fairly closely the specifications in the various .idl files, copies of
9
* which are provided for reference. Most important is this one:
11
* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
16
* Copyright (C) 2006-2008 Bob Jamison
18
* This library is free software; you can redistribute it and/or
19
* modify it under the terms of the GNU Lesser General Public
20
* License as published by the Free Software Foundation; either
21
* version 2.1 of the License, or (at your option) any later version.
23
* This library is distributed in the hope that it will be useful,
24
* but WITHOUT ANY WARRANTY; without even the implied warranty of
25
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26
* Lesser General Public License for more details.
28
* You should have received a copy of the GNU Lesser General Public
29
* License along with this library; if not, write to the Free Software
30
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32
* =======================================================================
36
* http://www.w3.org/TR/SVG11/svgdom.html
38
* This file contains the definitions of the non-Node SVG classes. DOM Nodes
39
* for SVG are defined in svg.h.
44
// For access to DOM2 core
47
// For access to DOM2 events
48
#include "dom/events.h"
50
// For access to those parts from DOM2 CSS OM used by SVG DOM.
53
// For access to those parts from DOM2 Views OM used by SVG DOM.
54
#include "dom/views.h"
56
// For access to the SMIL OM used by SVG DOM.
74
typedef dom::DOMString DOMString;
75
typedef dom::DOMException DOMException;
76
typedef dom::Element Element;
77
typedef dom::Document Document;
78
typedef dom::NodeList NodeList;
82
typedef Ptr<SVGElement> SVGElementPtr;
84
typedef Ptr<SVGUseElement> SVGUseElementPtr;
85
class SVGAnimatedPreserveAspectRatio;
88
/*#########################################################################
90
#########################################################################*/
98
// unsigned short code; //inherited
106
SVG_WRONG_TYPE_ERR = 0,
107
SVG_INVALID_VALUE_ERR = 1,
108
SVG_MATRIX_NOT_INVERTABLE = 2
115
/*#########################################################################
117
#########################################################################*/
120
* In SVG, a Matrix is defined like this:
135
virtual double getA()
141
virtual void setA(double val) throw (DOMException)
147
virtual double getB()
153
virtual void setB(double val) throw (DOMException)
159
virtual double getC()
165
virtual void setC(double val) throw (DOMException)
171
virtual double getD()
177
virtual void setD(double val) throw (DOMException)
182
virtual double getE()
188
virtual void setE(double val) throw (DOMException)
193
virtual double getF()
199
virtual void setF(double val) throw (DOMException)
204
* Return the result of postmultiplying this matrix with another.
206
virtual SVGMatrix multiply(const SVGMatrix &other)
209
result.a = a * other.a + c * other.b;
210
result.b = b * other.a + d * other.b;
211
result.c = a * other.c + c * other.d;
212
result.d = b * other.c + d * other.d;
213
result.e = a * other.e + c * other.f + e;
214
result.f = b * other.e + d * other.f + f;
219
* Calculate the inverse of this matrix
222
virtual SVGMatrix inverse( ) throw( SVGException )
224
/*###########################################
225
The determinant of a 3x3 matrix E
226
(let's use our own notation for a bit)
232
AEI - AFH - BDI + BFG + CDH - CEG
234
Since in our affine transforms, G and H==0 and I==1,
237
In SVG's naming scheme, that is: a * d - c * b . SIMPLE!
239
In a similar method of attack, SVG's adjunct matrix is:
245
To get the inverse matrix, we divide the adjunct matrix by
246
the determinant. Notice that (ad-cb)/(ad-cb)==1. Very cool.
247
So what we end up with is this:
249
a = d/(ad-cb) c = -c/(ad-cb) e = (cf-ed)/(ad-cb)
250
b = -b/(ad-cb) d = a/(ad-cb) f = (eb-af)/(ad-cb)
252
(Since this would be in all SVG-DOM implementations,
253
somebody needed to document this! ^^ )
254
#############################################*/
257
double determinant = a * d - c * b;
258
if (determinant < 1.0e-18)//invertible?
260
result.identity();//cop out
264
double idet = 1.0 / determinant;
266
result.b = -b * idet;
267
result.c = -c * idet;
269
result.e = (c*f - e*d) * idet;
270
result.f = (e*b - a*f) * idet;
275
* Equivalent to multiplying by:
281
virtual SVGMatrix translate(double x, double y )
288
result.e = a * x + c * y + e;
289
result.f = b * x + d * y + f;
294
* Equivalent to multiplying by:
300
virtual SVGMatrix scale(double scale)
303
result.a = a * scale;
304
result.b = b * scale;
305
result.c = c * scale;
306
result.d = d * scale;
313
* Equivalent to multiplying by:
319
virtual SVGMatrix scaleNonUniform(double scaleX,
323
result.a = a * scaleX;
324
result.b = b * scaleX;
325
result.c = c * scaleY;
326
result.d = d * scaleY;
333
* Equivalent to multiplying by:
334
* | cos(a) -sin(a) 0 |
335
* | sin(a) cos(a) 0 |
339
virtual SVGMatrix rotate (double angle)
341
double sina = sin(angle);
342
double msina = -sina;
343
double cosa = cos(angle);
345
result.a = a * cosa + c * sina;
346
result.b = b * cosa + d + sina;
347
result.c = a * msina + c * cosa;
348
result.d = b * msina + d * cosa;
355
* Equivalent to multiplying by:
356
* | cos(a) -sin(a) 0 |
357
* | sin(a) cos(a) 0 |
359
* In this case, angle 'a' is computed as the artangent
360
* of the slope y/x . It is negative if the slope is negative.
362
virtual SVGMatrix rotateFromVector(double x, double y)
363
throw( SVGException )
365
double angle = atan(y / x);
369
double sina = sin(angle);
370
double msina = -sina;
371
double cosa = cos(angle);
372
result.a = a * cosa + c * sina;
373
result.b = b * cosa + d + sina;
374
result.c = a * msina + c * cosa;
375
result.d = b * msina + d * cosa;
382
* Equivalent to multiplying by:
388
virtual SVGMatrix flipX( )
401
* Equivalent to multiplying by:
407
virtual SVGMatrix flipY( )
425
virtual SVGMatrix skewX(double angle)
427
double tana = tan(angle);
431
result.c = a * tana + c;
432
result.d = b * tana + d;
439
* Equivalent to multiplying by:
445
virtual SVGMatrix skewY(double angle)
447
double tana = tan(angle);
449
result.a = a + c * tana;
450
result.b = b + d * tana;
475
SVGMatrix(double aArg, double bArg, double cArg,
476
double dArg, double eArg, double fArg )
478
a = aArg; b = bArg; c = cArg;
479
d = dArg; e = eArg; f = fArg;
485
SVGMatrix(const SVGMatrix &other)
500
virtual ~SVGMatrix() {}
504
friend class SVGTransform;
507
* Set to the identify matrix
519
double a, b, c, d, e, f;
524
/*#########################################################################
526
#########################################################################*/
540
SVG_TRANSFORM_UNKNOWN = 0,
541
SVG_TRANSFORM_MATRIX = 1,
542
SVG_TRANSFORM_TRANSLATE = 2,
543
SVG_TRANSFORM_SCALE = 3,
544
SVG_TRANSFORM_ROTATE = 4,
545
SVG_TRANSFORM_SKEWX = 5,
546
SVG_TRANSFORM_SKEWY = 6,
552
virtual unsigned short getType()
559
virtual SVGMatrix getMatrix()
567
virtual double getAngle()
576
virtual void setMatrix(const SVGMatrix &matrixArg)
578
type = SVG_TRANSFORM_MATRIX;
585
virtual void setTranslate (double tx, double ty )
587
type = SVG_TRANSFORM_TRANSLATE;
599
virtual void setScale (double sx, double sy )
601
type = SVG_TRANSFORM_SCALE;
613
virtual void setRotate (double angleArg, double cx, double cy)
616
setTranslate(cx, cy);
617
type = SVG_TRANSFORM_ROTATE;
618
matrix.rotate(angle);
624
virtual void setSkewX (double angleArg)
627
type = SVG_TRANSFORM_SKEWX;
635
virtual void setSkewY (double angleArg)
638
type = SVG_TRANSFORM_SKEWY;
653
type = SVG_TRANSFORM_UNKNOWN;
660
SVGTransform(const SVGTransform &other)
664
matrix = other.matrix;
670
virtual ~SVGTransform()
686
/*#########################################################################
688
#########################################################################*/
693
class SVGTransformList
701
virtual unsigned long getNumberOfItems()
702
{ return items.size(); }
708
virtual void clear( ) throw( DOMException )
714
virtual SVGTransform initialize (const SVGTransform &newItem)
715
throw( DOMException, SVGException )
718
items.push_back(newItem);
725
virtual SVGTransform getItem (unsigned long index )
726
throw( DOMException )
728
if (index>=items.size())
730
SVGTransform transform;
739
virtual SVGTransform insertItemBefore (const SVGTransform &newItem,
740
unsigned long index )
741
throw( DOMException, SVGException )
743
if (index > items.size())
744
items.push_back(newItem);
747
std::vector<SVGTransform>::iterator iter = items.begin() + index;
748
items.insert(iter, newItem);
756
virtual SVGTransform replaceItem (const SVGTransform &newItem,
757
unsigned long index )
758
throw( DOMException, SVGException )
760
if (index>=items.size())
762
SVGTransform transform;
767
std::vector<SVGTransform>::iterator iter = items.begin() + index;
776
virtual SVGTransform removeItem (unsigned long index )
777
throw( DOMException )
779
if (index>=items.size())
781
SVGTransform transform;
784
std::vector<SVGTransform>::iterator iter = items.begin() + index;
785
SVGTransform oldItem = *iter;
793
virtual SVGTransform appendItem (const SVGTransform &newItem)
794
throw( DOMException, SVGException )
796
items.push_back(newItem);
803
virtual SVGTransform createSVGTransformFromMatrix(const SVGMatrix &matrix)
805
SVGTransform transform;
806
transform.setMatrix(matrix);
813
virtual SVGTransform consolidate()
816
for (unsigned int i=0 ; i<items.size() ; i++)
817
matrix = matrix.multiply(items[i].getMatrix());
818
SVGTransform transform;
819
transform.setMatrix(matrix);
821
items.push_back(transform);
840
SVGTransformList(const SVGTransformList &other)
848
virtual ~SVGTransformList() {}
852
std::vector<SVGTransform> items;
861
/*#########################################################################
862
## SVGAnimatedTransformList
863
#########################################################################*/
868
class SVGAnimatedTransformList
875
virtual SVGTransformList getBaseVal()
881
virtual SVGTransformList getAnimVal()
893
SVGAnimatedTransformList()
899
SVGAnimatedTransformList(const SVGAnimatedTransformList &other)
901
baseVal = other.baseVal;
902
animVal = other.animVal;
908
virtual ~SVGAnimatedTransformList() {}
912
SVGTransformList baseVal;
913
SVGTransformList animVal;
920
/*#########################################################################
921
## SVGAnimatedBoolean
922
#########################################################################*/
927
class SVGAnimatedBoolean
934
virtual bool getBaseVal()
942
virtual void setBaseVal(bool val) throw (DOMException)
950
virtual bool getAnimVal()
965
baseVal = animVal = false;
971
SVGAnimatedBoolean(const SVGAnimatedBoolean &other)
973
baseVal = other.baseVal;
974
animVal = other.animVal;
980
virtual ~SVGAnimatedBoolean() {}
984
bool baseVal, animVal;
991
/*#########################################################################
993
#########################################################################*/
998
class SVGAnimatedString
1005
virtual DOMString getBaseVal()
1013
virtual void setBaseVal(const DOMString &val)
1014
throw (DOMException)
1022
virtual DOMString getAnimVal()
1028
//##################
1030
//##################
1045
SVGAnimatedString(const SVGAnimatedString &other)
1047
baseVal = other.baseVal;
1048
animVal = other.animVal;
1054
virtual ~SVGAnimatedString() {}
1058
DOMString baseVal, animVal;
1066
/*#########################################################################
1068
#########################################################################*/
1081
virtual unsigned long getNumberOfItems()
1083
return items.size();
1089
virtual void clear () throw( DOMException )
1097
virtual DOMString initialize ( const DOMString& newItem )
1098
throw( DOMException, SVGException )
1101
items.push_back(newItem);
1108
virtual DOMString getItem ( unsigned long index )
1109
throw( DOMException )
1111
if (index >= items.size())
1113
return items[index];
1119
virtual DOMString insertItemBefore ( const DOMString& newItem,
1120
unsigned long index )
1121
throw( DOMException, SVGException )
1123
if (index>=items.size())
1125
items.push_back(newItem);
1129
std::vector<DOMString>::iterator iter = items.begin() + index;
1130
items.insert(iter, newItem);
1138
virtual DOMString replaceItem ( const DOMString& newItem,
1139
unsigned long index )
1140
throw( DOMException, SVGException )
1142
if (index>=items.size())
1144
std::vector<DOMString>::iterator iter = items.begin() + index;
1152
virtual DOMString removeItem ( unsigned long index )
1153
throw( DOMException )
1155
if (index>=items.size())
1157
std::vector<DOMString>::iterator iter = items.begin() + index;
1158
DOMString oldstr = *iter;
1166
virtual DOMString appendItem ( const DOMString& newItem )
1167
throw( DOMException, SVGException )
1169
items.push_back(newItem);
1175
//##################
1177
//##################
1187
SVGStringList(const SVGStringList &other)
1189
items = other.items;
1195
virtual ~SVGStringList() {}
1199
std::vector<DOMString>items;
1207
/*#########################################################################
1208
## SVGAnimatedEnumeration
1209
#########################################################################*/
1214
class SVGAnimatedEnumeration
1221
virtual unsigned short getBaseVal()
1229
virtual void setBaseVal(unsigned short val)
1230
throw (DOMException)
1238
virtual unsigned short getAnimVal()
1245
//##################
1247
//##################
1253
SVGAnimatedEnumeration()
1255
baseVal = animVal = 0;
1261
SVGAnimatedEnumeration(const SVGAnimatedEnumeration &other)
1263
baseVal = other.baseVal;
1264
animVal = other.animVal;
1270
virtual ~SVGAnimatedEnumeration() {}
1274
int baseVal, animVal;
1282
/*#########################################################################
1283
## SVGAnimatedInteger
1284
#########################################################################*/
1289
class SVGAnimatedInteger
1297
virtual long getBaseVal()
1305
virtual void setBaseVal(long val) throw (DOMException)
1313
virtual long getAnimVal()
1320
//##################
1322
//##################
1328
SVGAnimatedInteger()
1329
{ baseVal = animVal = 0L;}
1335
SVGAnimatedInteger(long value)
1344
SVGAnimatedInteger(long baseValArg, long animValArg)
1346
baseVal = baseValArg;
1347
animVal = animValArg;
1354
SVGAnimatedInteger(const SVGAnimatedInteger &other)
1356
baseVal = other.baseVal;
1357
animVal = other.animVal;
1363
virtual ~SVGAnimatedInteger() {}
1367
long baseVal, animVal;
1375
/*#########################################################################
1377
#########################################################################*/
1390
virtual double getValue()
1398
virtual void setValue(double val) throw (DOMException)
1404
//##################
1406
//##################
1419
SVGNumber(const SVGNumber &other)
1421
value = other.value;
1427
virtual ~SVGNumber() {}
1439
/*#########################################################################
1440
## SVGAnimatedNumber
1441
#########################################################################*/
1446
class SVGAnimatedNumber
1455
virtual double getBaseVal()
1463
virtual void setBaseVal(double val) throw (DOMException)
1471
virtual double getAnimVal()
1478
//##################
1480
//##################
1487
baseVal = animVal = 0.0;
1494
SVGAnimatedNumber(double val)
1504
SVGAnimatedNumber(double baseValArg, double animValArg)
1506
baseVal = baseValArg;
1507
animVal = animValArg;
1513
SVGAnimatedNumber(const SVGAnimatedNumber &other)
1515
baseVal = other.baseVal;
1516
animVal = other.animVal;
1522
virtual ~SVGAnimatedNumber() {}
1526
double baseVal, animVal;
1534
/*#########################################################################
1536
#########################################################################*/
1548
virtual unsigned long getNumberOfItems()
1550
return items.size();
1557
virtual void clear() throw( DOMException )
1565
virtual SVGNumber initialize (const SVGNumber &newItem)
1566
throw( DOMException, SVGException )
1569
items.push_back(newItem);
1576
virtual SVGNumber getItem ( unsigned long index )
1577
throw( DOMException )
1579
if (index>=items.size())
1584
return items[index];
1590
virtual SVGNumber insertItemBefore ( const SVGNumber &newItem,
1591
unsigned long index )
1592
throw( DOMException, SVGException )
1594
if (index>=items.size())
1596
items.push_back(newItem);
1600
std::vector<SVGNumber>::iterator iter = items.begin() + index;
1601
items.insert(iter, newItem);
1609
virtual SVGNumber replaceItem ( const SVGNumber &newItem,
1610
unsigned long index )
1611
throw( DOMException, SVGException )
1613
if (index>=items.size())
1618
std::vector<SVGNumber>::iterator iter = items.begin() + index;
1626
virtual SVGNumber removeItem ( unsigned long index )
1627
throw( DOMException )
1629
if (index>=items.size())
1634
std::vector<SVGNumber>::iterator iter = items.begin() + index;
1635
SVGNumber oldval = *iter;
1643
virtual SVGNumber appendItem ( const SVGNumber &newItem )
1644
throw( DOMException, SVGException )
1646
items.push_back(newItem);
1651
//##################
1653
//##################
1663
SVGNumberList(const SVGNumberList &other)
1665
items = other.items;
1671
virtual ~SVGNumberList() {}
1675
std::vector<SVGNumber>items;
1683
/*#########################################################################
1684
## SVGAnimatedNumberList
1685
#########################################################################*/
1690
class SVGAnimatedNumberList
1698
virtual SVGNumberList &getBaseVal()
1706
virtual SVGNumberList &getAnimVal()
1713
//##################
1715
//##################
1720
SVGAnimatedNumberList() {}
1725
SVGAnimatedNumberList(const SVGAnimatedNumberList &other)
1727
baseVal = other.baseVal;
1728
animVal = other.animVal;
1734
virtual ~SVGAnimatedNumberList() {}
1738
SVGNumberList baseVal;
1739
SVGNumberList animVal;
1748
/*#########################################################################
1750
#########################################################################*/
1764
SVG_LENGTHTYPE_UNKNOWN = 0,
1765
SVG_LENGTHTYPE_NUMBER = 1,
1766
SVG_LENGTHTYPE_PERCENTAGE = 2,
1767
SVG_LENGTHTYPE_EMS = 3,
1768
SVG_LENGTHTYPE_EXS = 4,
1769
SVG_LENGTHTYPE_PX = 5,
1770
SVG_LENGTHTYPE_CM = 6,
1771
SVG_LENGTHTYPE_MM = 7,
1772
SVG_LENGTHTYPE_IN = 8,
1773
SVG_LENGTHTYPE_PT = 9,
1774
SVG_LENGTHTYPE_PC = 10
1781
virtual unsigned short getUnitType( )
1789
virtual double getValue( )
1797
virtual void setValue( double val ) throw (DOMException)
1805
virtual double getValueInSpecifiedUnits( )
1807
double result = 0.0;
1815
virtual void setValueInSpecifiedUnits( double /*val*/ )
1816
throw (DOMException)
1824
virtual DOMString getValueAsString( )
1828
snprintf(buf, 31, "%f", value);
1836
virtual void setValueAsString( const DOMString& /*val*/ )
1837
throw (DOMException)
1845
virtual void newValueSpecifiedUnits ( unsigned short /*unitType*/, double /*val*/ )
1852
virtual void convertToSpecifiedUnits ( unsigned short /*unitType*/ )
1858
//##################
1860
//##################
1867
unitType = SVG_LENGTHTYPE_UNKNOWN;
1875
SVGLength(const SVGLength &other)
1877
unitType = other.unitType;
1878
value = other.value;
1884
virtual ~SVGLength() {}
1899
/*#########################################################################
1900
## SVGAnimatedLength
1901
#########################################################################*/
1906
class SVGAnimatedLength
1913
virtual SVGLength &getBaseVal()
1921
virtual SVGLength &getAnimVal()
1928
//##################
1930
//##################
1935
SVGAnimatedLength() {}
1940
SVGAnimatedLength(const SVGAnimatedLength &other)
1942
baseVal = other.baseVal;
1943
animVal = other.animVal;
1949
virtual ~SVGAnimatedLength() {}
1953
SVGLength baseVal, animVal;
1962
/*#########################################################################
1964
#########################################################################*/
1976
virtual unsigned long getNumberOfItems()
1978
return items.size();
1985
virtual void clear ( ) throw( DOMException )
1993
virtual SVGLength initialize (const SVGLength &newItem )
1994
throw( DOMException, SVGException )
1997
items.push_back(newItem);
2004
virtual SVGLength getItem (unsigned long index)
2005
throw( DOMException )
2007
if (index>=items.size())
2012
return items[index];
2018
virtual SVGLength insertItemBefore (const SVGLength &newItem,
2019
unsigned long index )
2020
throw( DOMException, SVGException )
2022
if (index>=items.size())
2024
items.push_back(newItem);
2028
std::vector<SVGLength>::iterator iter = items.begin() + index;
2029
items.insert(iter, newItem);
2037
virtual SVGLength replaceItem (const SVGLength &newItem,
2038
unsigned long index )
2039
throw( DOMException, SVGException )
2041
if (index>=items.size())
2046
std::vector<SVGLength>::iterator iter = items.begin() + index;
2054
virtual SVGLength removeItem (unsigned long index )
2055
throw( DOMException )
2057
if (index>=items.size())
2062
std::vector<SVGLength>::iterator iter = items.begin() + index;
2063
SVGLength oldval = *iter;
2071
virtual SVGLength appendItem (const SVGLength &newItem )
2072
throw( DOMException, SVGException )
2074
items.push_back(newItem);
2079
//##################
2081
//##################
2091
SVGLengthList(const SVGLengthList &other)
2093
items = other.items;
2099
virtual ~SVGLengthList() {}
2103
std::vector<SVGLength>items;
2112
/*#########################################################################
2113
## SVGAnimatedLengthList
2114
#########################################################################*/
2119
class SVGAnimatedLengthList
2126
virtual SVGLengthList &getBaseVal()
2134
virtual SVGLengthList &getAnimVal()
2141
//##################
2143
//##################
2148
SVGAnimatedLengthList() {}
2153
SVGAnimatedLengthList(const SVGAnimatedLengthList &other)
2155
baseVal = other.baseVal;
2156
animVal = other.animVal;
2162
virtual ~SVGAnimatedLengthList() {}
2166
SVGLengthList baseVal, animVal;
2175
/*#########################################################################
2177
#########################################################################*/
2191
SVG_ANGLETYPE_UNKNOWN = 0,
2192
SVG_ANGLETYPE_UNSPECIFIED = 1,
2193
SVG_ANGLETYPE_DEG = 2,
2194
SVG_ANGLETYPE_RAD = 3,
2195
SVG_ANGLETYPE_GRAD = 4
2203
virtual unsigned short getUnitType()
2211
virtual double getValue()
2219
virtual void setValue(double val) throw (DOMException)
2227
virtual double getValueInSpecifiedUnits()
2229
double result = 0.0;
2237
virtual void setValueInSpecifiedUnits(double /*val*/)
2238
throw (DOMException)
2246
virtual DOMString getValueAsString()
2250
snprintf(buf, 31, "%f", value);
2258
virtual void setValueAsString(const DOMString &/*val*/)
2259
throw (DOMException)
2268
virtual void newValueSpecifiedUnits (unsigned short /*unitType*/,
2269
double /*valueInSpecifiedUnits*/ )
2277
virtual void convertToSpecifiedUnits (unsigned short /*unitType*/ )
2284
//##################
2286
//##################
2293
unitType = SVG_ANGLETYPE_UNKNOWN;
2300
SVGAngle(const SVGAngle &other)
2302
unitType = other.unitType;
2303
value = other.value;
2309
virtual ~SVGAngle() {}
2324
/*#########################################################################
2326
#########################################################################*/
2331
class SVGAnimatedAngle
2338
virtual SVGAngle getBaseVal()
2346
virtual SVGAngle getAnimVal()
2351
//##################
2353
//##################
2358
SVGAnimatedAngle() {}
2363
SVGAnimatedAngle(const SVGAngle &angle)
2364
{ baseVal = angle; }
2369
SVGAnimatedAngle(const SVGAnimatedAngle &other)
2371
baseVal = other.baseVal;
2372
animVal = other.animVal;
2378
virtual ~SVGAnimatedAngle() {}
2382
SVGAngle baseVal, animVal;
2391
/*#########################################################################
2393
#########################################################################*/
2405
virtual DOMString getColorProfile()
2407
return colorProfile;
2413
virtual void setColorProfile(const DOMString &val) throw (DOMException)
2421
virtual SVGNumberList &getColors()
2428
//##################
2430
//##################
2440
SVGICCColor(const SVGICCColor &other)
2442
colorProfile = other.colorProfile;
2443
colors = other.colors;
2449
virtual ~SVGICCColor() {}
2453
DOMString colorProfile;
2455
SVGNumberList colors;
2460
/*#########################################################################
2462
#########################################################################*/
2467
class SVGColor : virtual public css::CSSValue
2477
SVG_COLORTYPE_UNKNOWN = 0,
2478
SVG_COLORTYPE_RGBCOLOR = 1,
2479
SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
2480
SVG_COLORTYPE_CURRENTCOLOR = 3
2487
virtual unsigned short getColorType()
2495
virtual css::RGBColor getRgbColor()
2504
virtual SVGICCColor getIccColor()
2514
virtual void setRGBColor (const DOMString& /*rgbColor*/ )
2515
throw( SVGException )
2522
virtual void setRGBColorICCColor (const DOMString& /*rgbColor*/,
2523
const DOMString& /*iccColor*/ )
2524
throw( SVGException )
2531
virtual void setColor (unsigned short /*colorType*/,
2532
const DOMString& /*rgbColor*/,
2533
const DOMString& /*iccColor*/ )
2534
throw( SVGException )
2540
//##################
2542
//##################
2549
colorType = SVG_COLORTYPE_UNKNOWN;
2555
SVGColor(const SVGColor &other) : css::CSSValue(other)
2557
colorType = other.colorType;
2563
virtual ~SVGColor() {}
2580
/*#########################################################################
2582
#########################################################################*/
2594
virtual double getX()
2602
virtual void setX(double val) throw (DOMException)
2610
virtual double getY()
2618
virtual void setY(double val) throw (DOMException)
2626
virtual double getWidth()
2634
virtual void setWidth(double val) throw (DOMException)
2642
virtual double getHeight()
2650
virtual void setHeight(double val) throw (DOMException)
2656
//##################
2658
//##################
2665
x = y = width = height = 0.0;
2671
SVGRect(const SVGRect &other)
2675
width = other.width;
2676
height = other.height;
2682
virtual ~SVGRect() {}
2686
double x, y, width, height;
2695
/*#########################################################################
2697
#########################################################################*/
2702
class SVGAnimatedRect
2709
virtual SVGRect &getBaseVal()
2717
virtual SVGRect &getAnimVal()
2724
//##################
2726
//##################
2738
SVGAnimatedRect(const SVGAnimatedRect &other)
2740
baseVal = other.baseVal;
2741
animVal = other.animVal;
2747
virtual ~SVGAnimatedRect() {}
2751
SVGRect baseVal, animVal;
2757
/*#########################################################################
2759
#########################################################################*/
2773
virtual double getX()
2779
virtual void setX(double val) throw (DOMException)
2785
virtual double getY()
2791
virtual void setY(double val) throw (DOMException)
2797
virtual SVGPoint matrixTransform(const SVGMatrix &/*matrix*/)
2805
//##################
2807
//##################
2818
SVGPoint(const SVGPoint &other)
2827
virtual ~SVGPoint() {}
2839
/*#########################################################################
2841
#########################################################################*/
2853
virtual unsigned long getNumberOfItems()
2854
{ return items.size(); }
2859
virtual void clear() throw( DOMException )
2865
virtual SVGPoint initialize(const SVGPoint &newItem)
2866
throw( DOMException, SVGException )
2869
items.push_back(newItem);
2876
virtual SVGPoint getItem(unsigned long index )
2877
throw( DOMException )
2879
if (index >= items.size())
2884
return items[index];
2890
virtual SVGPoint insertItemBefore(const SVGPoint &newItem,
2891
unsigned long index )
2892
throw( DOMException, SVGException )
2894
if (index >= items.size())
2895
items.push_back(newItem);
2898
std::vector<SVGPoint>::iterator iter = items.begin() + index;
2899
items.insert(iter, newItem);
2907
virtual SVGPoint replaceItem(const SVGPoint &newItem,
2908
unsigned long index )
2909
throw( DOMException, SVGException )
2911
if (index >= items.size())
2916
std::vector<SVGPoint>::iterator iter = items.begin() + index;
2924
virtual SVGPoint removeItem(unsigned long index )
2925
throw( DOMException )
2927
if (index >= items.size())
2932
std::vector<SVGPoint>::iterator iter = items.begin() + index;
2933
SVGPoint oldItem = *iter;
2941
virtual SVGPoint appendItem(const SVGPoint &newItem)
2942
throw( DOMException, SVGException )
2944
items.push_back(newItem);
2949
//##################
2951
//##################
2962
SVGPointList(const SVGPointList &other)
2964
items = other.items;
2971
virtual ~SVGPointList() {}
2975
std::vector<SVGPoint> items;
2982
/*#########################################################################
2984
#########################################################################*/
2998
SVG_UNIT_TYPE_UNKNOWN = 0,
2999
SVG_UNIT_TYPE_USERSPACEONUSE = 1,
3000
SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2
3005
//##################
3007
//##################
3017
virtual ~SVGUnitTypes() {}
3026
/*#########################################################################
3028
#########################################################################*/
3040
virtual SVGAnimatedString getClassName()
3048
virtual css::CSSStyleDeclaration getStyle()
3057
virtual css::CSSValue getPresentationAttribute (const DOMString& /*name*/ )
3065
//##################
3067
//##################
3077
SVGStylable(const SVGStylable &other)
3079
className = other.className;
3080
style = other.style;
3086
virtual ~SVGStylable() {}
3090
SVGAnimatedString className;
3091
css::CSSStyleDeclaration style;
3096
/*#########################################################################
3098
#########################################################################*/
3110
virtual SVGElementPtr getNearestViewportElement()
3112
SVGElementPtr result;
3119
virtual SVGElementPtr getFarthestViewportElement()
3121
SVGElementPtr result;
3128
virtual SVGRect getBBox ( )
3136
virtual SVGMatrix getCTM ( )
3144
virtual SVGMatrix getScreenCTM ( )
3152
virtual SVGMatrix getTransformToElement (const SVGElement &/*element*/)
3153
throw( SVGException )
3162
//##################
3164
//##################
3174
SVGLocatable(const SVGLocatable &/*other*/)
3181
virtual ~SVGLocatable() {}
3187
SVGMatrix screenCtm;
3196
/*#########################################################################
3198
#########################################################################*/
3203
class SVGTransformable : public SVGLocatable
3211
virtual SVGAnimatedTransformList &getTransform()
3218
//##################
3220
//##################
3225
SVGTransformable() {}
3230
SVGTransformable(const SVGTransformable &other) : SVGLocatable(other)
3232
transforms = other.transforms;
3238
virtual ~SVGTransformable() {}
3242
SVGAnimatedTransformList transforms;
3250
/*#########################################################################
3252
#########################################################################*/
3265
virtual SVGStringList &getRequiredFeatures()
3267
return requiredFeatures;
3273
virtual SVGStringList &getRequiredExtensions()
3275
return requiredExtensions;
3281
virtual SVGStringList &getSystemLanguage()
3283
return systemLanguage;
3290
virtual bool hasExtension (const DOMString& /*extension*/ )
3297
//##################
3299
//##################
3309
SVGTests(const SVGTests &other)
3311
requiredFeatures = other.requiredFeatures;
3312
requiredExtensions = other.requiredExtensions;
3313
systemLanguage = other.systemLanguage;
3319
virtual ~SVGTests() {}
3323
SVGStringList requiredFeatures;
3324
SVGStringList requiredExtensions;
3325
SVGStringList systemLanguage;
3334
/*#########################################################################
3336
#########################################################################*/
3349
virtual DOMString getXmllang()
3357
virtual void setXmllang(const DOMString &val)
3358
throw (DOMException)
3366
virtual DOMString getXmlspace()
3374
virtual void setXmlspace(const DOMString &val)
3375
throw (DOMException)
3382
//##################
3384
//##################
3394
SVGLangSpace(const SVGLangSpace &other)
3396
xmlLang = other.xmlLang;
3397
xmlSpace = other.xmlSpace;
3403
virtual ~SVGLangSpace() {}
3417
/*#########################################################################
3418
## SVGExternalResourcesRequired
3419
#########################################################################*/
3424
class SVGExternalResourcesRequired
3432
virtual SVGAnimatedBoolean getExternalResourcesRequired()
3433
{ return required; }
3437
//##################
3439
//##################
3444
SVGExternalResourcesRequired()
3451
SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other)
3453
required = other.required;
3459
virtual ~SVGExternalResourcesRequired() {}
3463
SVGAnimatedBoolean required;
3472
/*#########################################################################
3473
## SVGPreserveAspectRatio
3474
#########################################################################*/
3479
class SVGPreserveAspectRatio
3489
SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
3490
SVG_PRESERVEASPECTRATIO_NONE = 1,
3491
SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
3492
SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
3493
SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
3494
SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
3495
SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
3496
SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
3497
SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
3498
SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
3499
SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
3504
* Meet-or-slice Types
3508
SVG_MEETORSLICE_UNKNOWN = 0,
3509
SVG_MEETORSLICE_MEET = 1,
3510
SVG_MEETORSLICE_SLICE = 2
3517
virtual unsigned short getAlign()
3523
virtual void setAlign(unsigned short val) throw (DOMException)
3529
virtual unsigned short getMeetOrSlice()
3530
{ return meetOrSlice; }
3535
virtual void setMeetOrSlice(unsigned short val) throw (DOMException)
3536
{ meetOrSlice = val; }
3540
//##################
3542
//##################
3547
SVGPreserveAspectRatio()
3549
align = SVG_PRESERVEASPECTRATIO_UNKNOWN;
3550
meetOrSlice = SVG_MEETORSLICE_UNKNOWN;
3556
SVGPreserveAspectRatio(const SVGPreserveAspectRatio &other)
3558
align = other.align;
3559
meetOrSlice = other.meetOrSlice;
3565
virtual ~SVGPreserveAspectRatio() {}
3569
unsigned short align;
3570
unsigned short meetOrSlice;
3579
/*#########################################################################
3580
## SVGAnimatedPreserveAspectRatio
3581
#########################################################################*/
3586
class SVGAnimatedPreserveAspectRatio
3594
virtual SVGPreserveAspectRatio getBaseVal()
3600
virtual SVGPreserveAspectRatio getAnimVal()
3605
//##################
3607
//##################
3612
SVGAnimatedPreserveAspectRatio() {}
3617
SVGAnimatedPreserveAspectRatio(const SVGAnimatedPreserveAspectRatio &other)
3619
baseVal = other.baseVal;
3620
baseVal = other.animVal;
3626
virtual ~SVGAnimatedPreserveAspectRatio() {}
3630
SVGPreserveAspectRatio baseVal;
3631
SVGPreserveAspectRatio animVal;
3638
/*#########################################################################
3640
#########################################################################*/
3645
class SVGFitToViewBox
3652
virtual SVGAnimatedRect getViewBox()
3658
virtual SVGAnimatedPreserveAspectRatio getPreserveAspectRatio()
3659
{ return preserveAspectRatio; }
3663
//##################
3665
//##################
3677
SVGFitToViewBox(const SVGFitToViewBox &other)
3679
viewBox = other.viewBox;
3680
preserveAspectRatio = other.preserveAspectRatio;
3686
virtual ~SVGFitToViewBox() {}
3690
SVGAnimatedRect viewBox;
3692
SVGAnimatedPreserveAspectRatio preserveAspectRatio;
3697
/*#########################################################################
3699
#########################################################################*/
3710
* Zoom and Pan Types
3714
SVG_ZOOMANDPAN_UNKNOWN = 0,
3715
SVG_ZOOMANDPAN_DISABLE = 1,
3716
SVG_ZOOMANDPAN_MAGNIFY = 2
3723
virtual unsigned short getZoomAndPan()
3724
{ return zoomAndPan; }
3729
virtual void setZoomAndPan(unsigned short val) throw (DOMException)
3730
{ zoomAndPan = val; }
3733
//##################
3735
//##################
3741
{ zoomAndPan = SVG_ZOOMANDPAN_UNKNOWN; }
3746
SVGZoomAndPan(const SVGZoomAndPan &other)
3747
{ zoomAndPan = other.zoomAndPan; }
3752
virtual ~SVGZoomAndPan() {}
3756
unsigned short zoomAndPan;
3765
/*#########################################################################
3767
#########################################################################*/
3772
class SVGViewSpec : public SVGZoomAndPan,
3773
public SVGFitToViewBox
3780
virtual SVGTransformList getTransform()
3781
{ return transform; }
3786
virtual SVGElementPtr getViewTarget()
3787
{ return viewTarget; }
3792
virtual DOMString getViewBoxString()
3801
virtual DOMString getPreserveAspectRatioString()
3810
virtual DOMString getTransformString()
3819
virtual DOMString getViewTargetString()
3827
//##################
3829
//##################
3842
SVGViewSpec(const SVGViewSpec &other) : SVGZoomAndPan(other), SVGFitToViewBox(other)
3844
viewTarget = other.viewTarget;
3845
transform = other.transform;
3851
virtual ~SVGViewSpec() {}
3855
SVGElementPtr viewTarget;
3856
SVGTransformList transform;
3864
/*#########################################################################
3866
#########################################################################*/
3871
class SVGURIReference
3878
virtual SVGAnimatedString getHref()
3883
//##################
3885
//##################
3890
SVGURIReference() {}
3895
SVGURIReference(const SVGURIReference &other)
3903
virtual ~SVGURIReference() {}
3907
SVGAnimatedString href;
3916
/*#########################################################################
3918
#########################################################################*/
3923
class SVGCSSRule : public css::CSSRule
3929
* Additional CSS RuleType to support ICC color specifications
3933
COLOR_PROFILE_RULE = 7
3934
} ColorProfileRuleType;
3936
//##################
3938
//##################
3944
{ type = COLOR_PROFILE_RULE; }
3949
SVGCSSRule(const SVGCSSRule &other) : css::CSSRule(other)
3950
{ type = COLOR_PROFILE_RULE; }
3955
virtual ~SVGCSSRule() {}
3961
/*#########################################################################
3962
## SVGRenderingIntent
3963
#########################################################################*/
3968
class SVGRenderingIntent
3973
* Rendering Intent Types
3977
RENDERING_INTENT_UNKNOWN = 0,
3978
RENDERING_INTENT_AUTO = 1,
3979
RENDERING_INTENT_PERCEPTUAL = 2,
3980
RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,
3981
RENDERING_INTENT_SATURATION = 4,
3982
RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5
3983
} RenderingIntentType;
3987
//##################
3989
//##################
3994
SVGRenderingIntent()
3996
renderingIntentType = RENDERING_INTENT_UNKNOWN;
4002
SVGRenderingIntent(const SVGRenderingIntent &other)
4004
renderingIntentType = other.renderingIntentType;
4010
virtual ~SVGRenderingIntent() {}
4014
unsigned short renderingIntentType;
4023
/*#########################################################################
4024
###########################################################################
4025
## P A T H S E G M E N T S
4026
###########################################################################
4027
#########################################################################*/
4029
static char const *const pathSegLetters[] =
4031
"@", // PATHSEG_UNKNOWN,
4032
"z", // PATHSEG_CLOSEPATH
4033
"M", // PATHSEG_MOVETO_ABS
4034
"m", // PATHSEG_MOVETO_REL,
4035
"L", // PATHSEG_LINETO_ABS
4036
"l", // PATHSEG_LINETO_REL
4037
"C", // PATHSEG_CURVETO_CUBIC_ABS
4038
"c", // PATHSEG_CURVETO_CUBIC_REL
4039
"Q", // PATHSEG_CURVETO_QUADRATIC_ABS,
4040
"q", // PATHSEG_CURVETO_QUADRATIC_REL
4041
"A", // PATHSEG_ARC_ABS
4042
"a", // PATHSEG_ARC_REL,
4043
"H", // PATHSEG_LINETO_HORIZONTAL_ABS,
4044
"h", // PATHSEG_LINETO_HORIZONTAL_REL
4045
"V", // PATHSEG_LINETO_VERTICAL_ABS
4046
"v", // PATHSEG_LINETO_VERTICAL_REL
4047
"S", // PATHSEG_CURVETO_CUBIC_SMOOTH_ABS
4048
"s", // PATHSEG_CURVETO_CUBIC_SMOOTH_REL
4049
"T", // PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS
4050
"t" // PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL
4053
/*#########################################################################
4055
#########################################################################*/
4067
* Path Segment Types
4071
PATHSEG_UNKNOWN = 0,
4072
PATHSEG_CLOSEPATH = 1,
4073
PATHSEG_MOVETO_ABS = 2,
4074
PATHSEG_MOVETO_REL = 3,
4075
PATHSEG_LINETO_ABS = 4,
4076
PATHSEG_LINETO_REL = 5,
4077
PATHSEG_CURVETO_CUBIC_ABS = 6,
4078
PATHSEG_CURVETO_CUBIC_REL = 7,
4079
PATHSEG_CURVETO_QUADRATIC_ABS = 8,
4080
PATHSEG_CURVETO_QUADRATIC_REL = 9,
4081
PATHSEG_ARC_ABS = 10,
4082
PATHSEG_ARC_REL = 11,
4083
PATHSEG_LINETO_HORIZONTAL_ABS = 12,
4084
PATHSEG_LINETO_HORIZONTAL_REL = 13,
4085
PATHSEG_LINETO_VERTICAL_ABS = 14,
4086
PATHSEG_LINETO_VERTICAL_REL = 15,
4087
PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16,
4088
PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17,
4089
PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18,
4090
PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19
4096
virtual unsigned short getPathSegType()
4102
virtual DOMString getPathSegTypeAsLetter()
4105
if (typ<0 || typ>PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL)
4106
typ = PATHSEG_UNKNOWN;
4107
char const *ch = pathSegLetters[typ];
4108
DOMString letter = ch;
4114
//##################
4116
//##################
4122
{ type = PATHSEG_UNKNOWN; }
4127
SVGPathSeg(const SVGPathSeg &other)
4135
virtual ~SVGPathSeg() {}
4148
/*#########################################################################
4149
## SVGPathSegClosePath
4150
#########################################################################*/
4155
class SVGPathSegClosePath : public SVGPathSeg
4159
//##################
4161
//##################
4166
SVGPathSegClosePath()
4168
type = PATHSEG_CLOSEPATH;
4174
SVGPathSegClosePath(const SVGPathSegClosePath &other) : SVGPathSeg(other)
4176
type = PATHSEG_CLOSEPATH;
4182
virtual ~SVGPathSegClosePath() {}
4189
/*#########################################################################
4190
## SVGPathSegMovetoAbs
4191
#########################################################################*/
4196
class SVGPathSegMovetoAbs : public SVGPathSeg
4203
virtual double getX()
4209
virtual void setX(double val) throw (DOMException)
4215
virtual double getY()
4221
virtual void setY(double val) throw (DOMException)
4224
//##################
4226
//##################
4231
SVGPathSegMovetoAbs()
4233
type = PATHSEG_MOVETO_ABS;
4240
SVGPathSegMovetoAbs(double xArg, double yArg)
4242
type = PATHSEG_MOVETO_ABS;
4249
SVGPathSegMovetoAbs(const SVGPathSegMovetoAbs &other) : SVGPathSeg(other)
4251
type = PATHSEG_MOVETO_ABS;
4252
x = other.x; y = other.y;
4258
virtual ~SVGPathSegMovetoAbs() {}
4271
/*#########################################################################
4272
## SVGPathSegMovetoRel
4273
#########################################################################*/
4278
class SVGPathSegMovetoRel : public SVGPathSeg
4285
virtual double getX()
4291
virtual void setX(double val) throw (DOMException)
4297
virtual double getY()
4303
virtual void setY(double val) throw (DOMException)
4306
//##################
4308
//##################
4313
SVGPathSegMovetoRel()
4315
type = PATHSEG_MOVETO_REL;
4323
SVGPathSegMovetoRel(double xArg, double yArg)
4325
type = PATHSEG_MOVETO_REL;
4332
SVGPathSegMovetoRel(const SVGPathSegMovetoRel &other) : SVGPathSeg(other)
4334
type = PATHSEG_MOVETO_REL;
4335
x = other.x; y = other.y;
4341
virtual ~SVGPathSegMovetoRel() {}
4353
/*#########################################################################
4354
## SVGPathSegLinetoAbs
4355
#########################################################################*/
4360
class SVGPathSegLinetoAbs : public SVGPathSeg
4367
virtual double getX()
4373
virtual void setX(double val) throw (DOMException)
4379
virtual double getY()
4385
virtual void setY(double val) throw (DOMException)
4388
//##################
4390
//##################
4395
SVGPathSegLinetoAbs()
4397
type = PATHSEG_LINETO_ABS;
4405
SVGPathSegLinetoAbs(double xArg, double yArg)
4407
type = PATHSEG_LINETO_ABS;
4414
SVGPathSegLinetoAbs(const SVGPathSegLinetoAbs &other) : SVGPathSeg(other)
4416
type = PATHSEG_LINETO_ABS;
4417
x = other.x; y = other.y;
4423
virtual ~SVGPathSegLinetoAbs() {}
4435
/*#########################################################################
4436
## SVGPathSegLinetoRel
4437
#########################################################################*/
4442
class SVGPathSegLinetoRel : public SVGPathSeg
4449
virtual double getX()
4455
virtual void setX(double val) throw (DOMException)
4461
virtual double getY()
4467
virtual void setY(double val) throw (DOMException)
4470
//##################
4472
//##################
4477
SVGPathSegLinetoRel()
4479
type = PATHSEG_LINETO_REL;
4487
SVGPathSegLinetoRel(double xArg, double yArg)
4489
type = PATHSEG_LINETO_REL;
4496
SVGPathSegLinetoRel(const SVGPathSegLinetoRel &other) : SVGPathSeg(other)
4498
type = PATHSEG_LINETO_REL;
4499
x = other.x; y = other.y;
4505
virtual ~SVGPathSegLinetoRel() {}
4517
/*#########################################################################
4518
## SVGPathSegCurvetoCubicAbs
4519
#########################################################################*/
4524
class SVGPathSegCurvetoCubicAbs : public SVGPathSeg
4531
virtual double getX()
4537
virtual void setX(double val) throw (DOMException)
4543
virtual double getY()
4549
virtual void setY(double val) throw (DOMException)
4555
virtual double getX1()
4561
virtual void setX1(double val) throw (DOMException)
4567
virtual double getY1()
4573
virtual void setY1(double val) throw (DOMException)
4580
virtual double getX2()
4586
virtual void setX2(double val) throw (DOMException)
4592
virtual double getY2()
4598
virtual void setY2(double val) throw (DOMException)
4602
//##################
4604
//##################
4610
SVGPathSegCurvetoCubicAbs()
4612
type = PATHSEG_CURVETO_CUBIC_ABS;
4613
x = y = x1 = y1 = x2 = y2 = 0.0;
4619
SVGPathSegCurvetoCubicAbs(double xArg, double yArg,
4620
double x1Arg, double y1Arg,
4621
double x2Arg, double y2Arg)
4623
type = PATHSEG_CURVETO_CUBIC_ABS;
4625
x1 = x1Arg; y1 = y1Arg;
4626
x2 = x2Arg; y2 = y2Arg;
4632
SVGPathSegCurvetoCubicAbs(const SVGPathSegCurvetoCubicAbs &other)
4635
type = PATHSEG_CURVETO_CUBIC_ABS;
4636
x = other.x; y = other.y;
4637
x1 = other.x1; y1 = other.y1;
4638
x2 = other.x2; y2 = other.y2;
4644
virtual ~SVGPathSegCurvetoCubicAbs() {}
4648
double x, y, x1, y1, x2, y2;
4657
/*#########################################################################
4658
## SVGPathSegCurvetoCubicRel
4659
#########################################################################*/
4664
class SVGPathSegCurvetoCubicRel : public SVGPathSeg
4671
virtual double getX()
4677
virtual void setX(double val) throw (DOMException)
4683
virtual double getY()
4689
virtual void setY(double val) throw (DOMException)
4695
virtual double getX1()
4701
virtual void setX1(double val) throw (DOMException)
4707
virtual double getY1()
4713
virtual void setY1(double val) throw (DOMException)
4720
virtual double getX2()
4726
virtual void setX2(double val) throw (DOMException)
4732
virtual double getY2()
4738
virtual void setY2(double val) throw (DOMException)
4742
//##################
4744
//##################
4750
SVGPathSegCurvetoCubicRel()
4752
type = PATHSEG_CURVETO_CUBIC_REL;
4753
x = y = x1 = y1 = x2 = y2 = 0.0;
4760
SVGPathSegCurvetoCubicRel(double xArg, double yArg,
4761
double x1Arg, double y1Arg,
4762
double x2Arg, double y2Arg)
4764
type = PATHSEG_CURVETO_CUBIC_REL;
4766
x1 = x1Arg; y1 = y1Arg;
4767
x2 = x2Arg; y2 = y2Arg;
4773
SVGPathSegCurvetoCubicRel(const SVGPathSegCurvetoCubicRel &other)
4776
type = PATHSEG_CURVETO_CUBIC_REL;
4777
x = other.x; y = other.y;
4778
x1 = other.x1; y1 = other.y1;
4779
x2 = other.x2; y2 = other.y2;
4785
virtual ~SVGPathSegCurvetoCubicRel() {}
4789
double x, y, x1, y1, x2, y2;
4798
/*#########################################################################
4799
## SVGPathSegCurvetoQuadraticAbs
4800
#########################################################################*/
4805
class SVGPathSegCurvetoQuadraticAbs : public SVGPathSeg
4812
virtual double getX()
4818
virtual void setX(double val) throw (DOMException)
4824
virtual double getY()
4830
virtual void setY(double val) throw (DOMException)
4836
virtual double getX1()
4842
virtual void setX1(double val) throw (DOMException)
4848
virtual double getY1()
4854
virtual void setY1(double val) throw (DOMException)
4858
//##################
4860
//##################
4866
SVGPathSegCurvetoQuadraticAbs()
4868
type = PATHSEG_CURVETO_QUADRATIC_ABS;
4869
x = y = x1 = y1 = 0.0;
4875
SVGPathSegCurvetoQuadraticAbs(double xArg, double yArg,
4876
double x1Arg, double y1Arg)
4878
type = PATHSEG_CURVETO_QUADRATIC_ABS;
4880
x1 = x1Arg; y1 = y1Arg;
4886
SVGPathSegCurvetoQuadraticAbs(const SVGPathSegCurvetoQuadraticAbs &other)
4889
type = PATHSEG_CURVETO_QUADRATIC_ABS;
4890
x = other.x; y = other.y;
4891
x1 = other.x1; y1 = other.y1;
4897
virtual ~SVGPathSegCurvetoQuadraticAbs() {}
4901
double x, y, x1, y1;
4910
/*#########################################################################
4911
## SVGPathSegCurvetoQuadraticRel
4912
#########################################################################*/
4917
class SVGPathSegCurvetoQuadraticRel : public SVGPathSeg
4924
virtual double getX()
4930
virtual void setX(double val) throw (DOMException)
4936
virtual double getY()
4942
virtual void setY(double val) throw (DOMException)
4948
virtual double getX1()
4954
virtual void setX1(double val) throw (DOMException)
4960
virtual double getY1()
4966
virtual void setY1(double val) throw (DOMException)
4970
//##################
4972
//##################
4978
SVGPathSegCurvetoQuadraticRel()
4980
type = PATHSEG_CURVETO_QUADRATIC_REL;
4981
x = y = x1 = y1 = 0.0;
4988
SVGPathSegCurvetoQuadraticRel(double xArg, double yArg,
4989
double x1Arg, double y1Arg)
4991
type = PATHSEG_CURVETO_QUADRATIC_REL;
4993
x1 = x1Arg; y1 = y1Arg;
4999
SVGPathSegCurvetoQuadraticRel(const SVGPathSegCurvetoQuadraticRel &other)
5002
type = PATHSEG_CURVETO_QUADRATIC_REL;
5003
x = other.x; y = other.y;
5004
x1 = other.x1; y1 = other.y1;
5010
virtual ~SVGPathSegCurvetoQuadraticRel() {}
5014
double x, y, x1, y1;
5023
/*#########################################################################
5025
#########################################################################*/
5030
class SVGPathSegArcAbs : public SVGPathSeg
5037
virtual double getX()
5043
virtual void setX(double val) throw (DOMException)
5049
virtual double getY()
5055
virtual void setY(double val) throw (DOMException)
5061
virtual double getR1()
5067
virtual void setR1(double val) throw (DOMException)
5073
virtual double getR2()
5079
virtual void setR2(double val) throw (DOMException)
5085
virtual double getAngle()
5091
virtual void setAngle(double val) throw (DOMException)
5097
virtual bool getLargeArcFlag()
5098
{ return largeArcFlag; }
5103
virtual void setLargeArcFlag(bool val) throw (DOMException)
5104
{ largeArcFlag = val; }
5109
virtual bool getSweepFlag()
5110
{ return sweepFlag; }
5115
virtual void setSweepFlag(bool val) throw (DOMException)
5116
{ sweepFlag = val; }
5118
//##################
5120
//##################
5128
type = PATHSEG_ARC_ABS;
5129
x = y = r1 = r2 = angle = 0.0;
5130
largeArcFlag = sweepFlag = false;
5136
SVGPathSegArcAbs(double xArg, double yArg,
5137
double r1Arg, double r2Arg,
5139
bool largeArcFlagArg,
5143
type = PATHSEG_ARC_ABS;
5145
r1 = r1Arg; r2 = r2Arg;
5147
largeArcFlag = largeArcFlagArg;
5148
sweepFlag = sweepFlagArg;
5154
SVGPathSegArcAbs(const SVGPathSegArcAbs &other)
5157
type = PATHSEG_ARC_ABS;
5158
x = other.x; y = other.y;
5159
r1 = other.r1; r2 = other.r2;
5160
angle = other.angle;
5161
largeArcFlag = other.largeArcFlag;
5162
sweepFlag = other.sweepFlag;
5168
virtual ~SVGPathSegArcAbs() {}
5172
double x, y, r1, r2, angle;
5180
/*#########################################################################
5182
#########################################################################*/
5187
class SVGPathSegArcRel : public SVGPathSeg
5194
virtual double getX()
5200
virtual void setX(double val) throw (DOMException)
5206
virtual double getY()
5212
virtual void setY(double val) throw (DOMException)
5218
virtual double getR1()
5224
virtual void setR1(double val) throw (DOMException)
5230
virtual double getR2()
5236
virtual void setR2(double val) throw (DOMException)
5242
virtual double getAngle()
5248
virtual void setAngle(double val) throw (DOMException)
5254
virtual bool getLargeArcFlag()
5255
{ return largeArcFlag; }
5260
virtual void setLargeArcFlag(bool val) throw (DOMException)
5261
{ largeArcFlag = val; }
5266
virtual bool getSweepFlag()
5267
{ return sweepFlag; }
5272
virtual void setSweepFlag(bool val) throw (DOMException)
5273
{ sweepFlag = val; }
5275
//##################
5277
//##################
5285
type = PATHSEG_ARC_REL;
5286
x = y = r1 = r2 = angle = 0.0;
5287
largeArcFlag = sweepFlag = false;
5294
SVGPathSegArcRel(double xArg, double yArg,
5295
double r1Arg, double r2Arg,
5297
bool largeArcFlagArg,
5301
type = PATHSEG_ARC_REL;
5303
r1 = r1Arg; r2 = r2Arg;
5305
largeArcFlag = largeArcFlagArg;
5306
sweepFlag = sweepFlagArg;
5312
SVGPathSegArcRel(const SVGPathSegArcRel &other)
5315
type = PATHSEG_ARC_REL;
5316
x = other.x; y = other.y;
5317
r1 = other.r1; r2 = other.r2;
5318
angle = other.angle;
5319
largeArcFlag = other.largeArcFlag;
5320
sweepFlag = other.sweepFlag;
5326
virtual ~SVGPathSegArcRel() {}
5330
double x, y, r1, r2, angle;
5341
/*#########################################################################
5342
## SVGPathSegLinetoHorizontalAbs
5343
#########################################################################*/
5348
class SVGPathSegLinetoHorizontalAbs : public SVGPathSeg
5355
virtual double getX()
5361
virtual void setX(double val) throw (DOMException)
5364
//##################
5366
//##################
5371
SVGPathSegLinetoHorizontalAbs()
5373
type = PATHSEG_LINETO_HORIZONTAL_ABS;
5381
SVGPathSegLinetoHorizontalAbs(double xArg)
5383
type = PATHSEG_LINETO_HORIZONTAL_ABS;
5390
SVGPathSegLinetoHorizontalAbs(const SVGPathSegLinetoHorizontalAbs &other)
5393
type = PATHSEG_LINETO_HORIZONTAL_ABS;
5400
virtual ~SVGPathSegLinetoHorizontalAbs() {}
5413
/*#########################################################################
5414
## SVGPathSegLinetoHorizontalRel
5415
#########################################################################*/
5420
class SVGPathSegLinetoHorizontalRel : public SVGPathSeg
5427
virtual double getX()
5433
virtual void setX(double val) throw (DOMException)
5436
//##################
5438
//##################
5443
SVGPathSegLinetoHorizontalRel()
5445
type = PATHSEG_LINETO_HORIZONTAL_REL;
5453
SVGPathSegLinetoHorizontalRel(double xArg)
5455
type = PATHSEG_LINETO_HORIZONTAL_REL;
5462
SVGPathSegLinetoHorizontalRel(const SVGPathSegLinetoHorizontalRel &other)
5465
type = PATHSEG_LINETO_HORIZONTAL_REL;
5472
virtual ~SVGPathSegLinetoHorizontalRel() {}
5482
/*#########################################################################
5483
## SVGPathSegLinetoVerticalAbs
5484
#########################################################################*/
5489
class SVGPathSegLinetoVerticalAbs : public SVGPathSeg
5496
virtual double getY()
5502
virtual void setY(double val) throw (DOMException)
5505
//##################
5507
//##################
5512
SVGPathSegLinetoVerticalAbs()
5514
type = PATHSEG_LINETO_VERTICAL_ABS;
5522
SVGPathSegLinetoVerticalAbs(double yArg)
5524
type = PATHSEG_LINETO_VERTICAL_ABS;
5531
SVGPathSegLinetoVerticalAbs(const SVGPathSegLinetoVerticalAbs &other)
5534
type = PATHSEG_LINETO_VERTICAL_ABS;
5541
virtual ~SVGPathSegLinetoVerticalAbs() {}
5551
/*#########################################################################
5552
## SVGPathSegLinetoVerticalRel
5553
#########################################################################*/
5558
class SVGPathSegLinetoVerticalRel : public SVGPathSeg
5565
virtual double getY()
5571
virtual void setY(double val) throw (DOMException)
5574
//##################
5576
//##################
5581
SVGPathSegLinetoVerticalRel()
5583
type = PATHSEG_LINETO_VERTICAL_REL;
5591
SVGPathSegLinetoVerticalRel(double yArg)
5593
type = PATHSEG_LINETO_VERTICAL_REL;
5600
SVGPathSegLinetoVerticalRel(const SVGPathSegLinetoVerticalRel &other)
5603
type = PATHSEG_LINETO_VERTICAL_REL;
5610
virtual ~SVGPathSegLinetoVerticalRel() {}
5623
/*#########################################################################
5624
## SVGPathSegCurvetoCubicSmoothAbs
5625
#########################################################################*/
5630
class SVGPathSegCurvetoCubicSmoothAbs : public SVGPathSeg
5637
virtual double getX()
5643
virtual void setX(double val) throw (DOMException)
5649
virtual double getY()
5655
virtual void setY(double val) throw (DOMException)
5661
virtual double getX2()
5667
virtual void setX2(double val) throw (DOMException)
5673
virtual double getY2()
5679
virtual void setY2(double val) throw (DOMException)
5683
//##################
5685
//##################
5690
SVGPathSegCurvetoCubicSmoothAbs()
5692
type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
5693
x = y = x2 = y2 = 0.0;
5700
SVGPathSegCurvetoCubicSmoothAbs(double xArg, double yArg,
5701
double x2Arg, double y2Arg)
5703
type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
5705
x2 = x2Arg; y2 = y2Arg;
5711
SVGPathSegCurvetoCubicSmoothAbs(const SVGPathSegCurvetoCubicSmoothAbs &other)
5714
type = PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;
5715
x = other.x; y = other.y;
5716
x2 = other.x2; y2 = other.y2;
5722
virtual ~SVGPathSegCurvetoCubicSmoothAbs() {}
5726
double x, y, x2, y2;
5732
/*#########################################################################
5733
## SVGPathSegCurvetoCubicSmoothRel
5734
#########################################################################*/
5739
class SVGPathSegCurvetoCubicSmoothRel : public SVGPathSeg
5746
virtual double getX()
5752
virtual void setX(double val) throw (DOMException)
5758
virtual double getY()
5764
virtual void setY(double val) throw (DOMException)
5770
virtual double getX2()
5776
virtual void setX2(double val) throw (DOMException)
5782
virtual double getY2()
5788
virtual void setY2(double val) throw (DOMException)
5792
//##################
5794
//##################
5799
SVGPathSegCurvetoCubicSmoothRel()
5801
type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
5802
x = y = x2 = y2 = 0.0;
5809
SVGPathSegCurvetoCubicSmoothRel(double xArg, double yArg,
5810
double x2Arg, double y2Arg)
5812
type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
5814
x2 = x2Arg; y2 = y2Arg;
5820
SVGPathSegCurvetoCubicSmoothRel(const SVGPathSegCurvetoCubicSmoothRel &other)
5823
type = PATHSEG_CURVETO_CUBIC_SMOOTH_REL;
5824
x = other.x; y = other.y;
5825
x2 = other.x2; y2 = other.y2;
5831
virtual ~SVGPathSegCurvetoCubicSmoothRel() {}
5835
double x, y, x2, y2;
5844
/*#########################################################################
5845
## SVGPathSegCurvetoQuadraticSmoothAbs
5846
#########################################################################*/
5851
class SVGPathSegCurvetoQuadraticSmoothAbs : public SVGPathSeg
5858
virtual double getX()
5864
virtual void setX(double val) throw (DOMException)
5870
virtual double getY()
5876
virtual void setY(double val) throw (DOMException)
5881
//##################
5883
//##################
5888
SVGPathSegCurvetoQuadraticSmoothAbs()
5890
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
5898
SVGPathSegCurvetoQuadraticSmoothAbs(double xArg, double yArg)
5900
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
5907
SVGPathSegCurvetoQuadraticSmoothAbs(const SVGPathSegCurvetoQuadraticSmoothAbs &other)
5910
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;
5917
virtual ~SVGPathSegCurvetoQuadraticSmoothAbs() {}
5930
/*#########################################################################
5931
## SVGPathSegCurvetoQuadraticSmoothRel
5932
#########################################################################*/
5937
class SVGPathSegCurvetoQuadraticSmoothRel : public SVGPathSeg
5944
virtual double getX()
5950
virtual void setX(double val) throw (DOMException)
5956
virtual double getY()
5962
virtual void setY(double val) throw (DOMException)
5967
//##################
5969
//##################
5974
SVGPathSegCurvetoQuadraticSmoothRel()
5976
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
5984
SVGPathSegCurvetoQuadraticSmoothRel(double xArg, double yArg)
5986
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
5993
SVGPathSegCurvetoQuadraticSmoothRel(const SVGPathSegCurvetoQuadraticSmoothRel &other)
5996
type = PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;
6003
virtual ~SVGPathSegCurvetoQuadraticSmoothRel() {}
6016
/*#########################################################################
6018
#########################################################################*/
6023
class SVGPathSegList
6030
virtual unsigned long getNumberOfItems()
6031
{ return items.size(); }
6037
virtual void clear () throw( DOMException )
6043
virtual SVGPathSeg initialize (const SVGPathSeg &newItem)
6044
throw( DOMException, SVGException )
6047
items.push_back(newItem);
6054
virtual SVGPathSeg getItem (unsigned long index)
6055
throw( DOMException )
6057
if (index >= items.size())
6062
return items[index];
6068
virtual SVGPathSeg insertItemBefore(const SVGPathSeg &newItem,
6069
unsigned long index )
6070
throw( DOMException, SVGException )
6072
if (index >= items.size())
6073
items.push_back(newItem);
6076
std::vector<SVGPathSeg>::iterator iter = items.begin() + index;
6077
items.insert(iter, newItem);
6085
virtual SVGPathSeg replaceItem(const SVGPathSeg &newItem,
6086
unsigned long index )
6087
throw( DOMException, SVGException )
6089
if (index >= items.size())
6094
std::vector<SVGPathSeg>::iterator iter = items.begin() + index;
6102
virtual SVGPathSeg removeItem (unsigned long index)
6103
throw (DOMException)
6105
if (index >= items.size())
6110
std::vector<SVGPathSeg>::iterator iter = items.begin() + index;
6111
SVGPathSeg olditem = *iter;
6119
virtual SVGPathSeg appendItem (const SVGPathSeg &newItem)
6120
throw( DOMException, SVGException )
6122
items.push_back(newItem);
6128
//##################
6130
//##################
6141
SVGPathSegList(const SVGPathSegList &other)
6143
items = other.items;
6150
virtual ~SVGPathSegList() {}
6154
std::vector<SVGPathSeg> items;
6163
/*#########################################################################
6164
## SVGAnimatedPathData
6165
#########################################################################*/
6170
class SVGAnimatedPathData
6177
virtual SVGPathSegList getPathSegList()
6179
SVGPathSegList list;
6186
virtual SVGPathSegList getNormalizedPathSegList()
6188
SVGPathSegList list;
6195
virtual SVGPathSegList getAnimatedPathSegList()
6197
SVGPathSegList list;
6204
virtual SVGPathSegList getAnimatedNormalizedPathSegList()
6206
SVGPathSegList list;
6212
//##################
6214
//##################
6219
SVGAnimatedPathData()
6225
SVGAnimatedPathData(const SVGAnimatedPathData &/*other*/)
6232
virtual ~SVGAnimatedPathData() {}
6241
/*#########################################################################
6242
## SVGAnimatedPoints
6243
#########################################################################*/
6248
class SVGAnimatedPoints
6255
virtual SVGPointList getPoints()
6261
virtual SVGPointList getAnimatedPoints()
6262
{ return animatedPoints; }
6266
//##################
6268
//##################
6273
SVGAnimatedPoints() {}
6278
SVGAnimatedPoints(const SVGAnimatedPoints &other)
6280
points = other.points;
6281
animatedPoints = other.animatedPoints;
6287
virtual ~SVGAnimatedPoints() {}
6291
SVGPointList points;
6292
SVGPointList animatedPoints;
6300
/*#########################################################################
6302
#########################################################################*/
6307
class SVGPaint : public SVGColor
6317
SVG_PAINTTYPE_UNKNOWN = 0,
6318
SVG_PAINTTYPE_RGBCOLOR = 1,
6319
SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
6320
SVG_PAINTTYPE_NONE = 101,
6321
SVG_PAINTTYPE_CURRENTCOLOR = 102,
6322
SVG_PAINTTYPE_URI_NONE = 103,
6323
SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
6324
SVG_PAINTTYPE_URI_RGBCOLOR = 105,
6325
SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
6326
SVG_PAINTTYPE_URI = 107
6333
virtual unsigned short getPaintType()
6334
{ return paintType; }
6339
virtual DOMString getUri()
6345
virtual void setUri (const DOMString& uriArg )
6351
virtual void setPaint (unsigned short paintTypeArg,
6352
const DOMString& uriArg,
6353
const DOMString& /*rgbColor*/,
6354
const DOMString& /*iccColor*/ )
6355
throw( SVGException )
6357
paintType = paintTypeArg;
6359
//do something with rgbColor
6360
//do something with iccColor;
6365
//##################
6367
//##################
6375
paintType = SVG_PAINTTYPE_UNKNOWN;
6381
SVGPaint(const SVGPaint &other) : css::CSSValue(other), SVGColor(other)
6384
paintType = SVG_PAINTTYPE_UNKNOWN;
6390
virtual ~SVGPaint() {}
6394
unsigned int paintType;
6402
/*#########################################################################
6403
## SVGColorProfileRule
6404
#########################################################################*/
6409
class SVGColorProfileRule : public SVGCSSRule,
6410
public SVGRenderingIntent
6417
virtual DOMString getSrc()
6423
virtual void setSrc(const DOMString &val) throw (DOMException)
6429
virtual DOMString getName()
6435
virtual void setName(const DOMString &val) throw (DOMException)
6441
virtual unsigned short getRenderingIntent()
6442
{ return renderingIntent; }
6447
virtual void setRenderingIntent(unsigned short val) throw (DOMException)
6448
{ renderingIntent = val; }
6451
//##################
6453
//##################
6458
SVGColorProfileRule() {}
6463
SVGColorProfileRule(const SVGColorProfileRule &other)
6464
: SVGCSSRule(other), SVGRenderingIntent(other)
6466
renderingIntent = other.renderingIntent;
6474
virtual ~SVGColorProfileRule() {}
6478
unsigned short renderingIntent;
6486
/*#########################################################################
6487
## SVGFilterPrimitiveStandardAttributes
6488
#########################################################################*/
6493
class SVGFilterPrimitiveStandardAttributes : public SVGStylable
6502
virtual SVGAnimatedLength getX()
6508
virtual SVGAnimatedLength getY()
6514
virtual SVGAnimatedLength getWidth()
6520
virtual SVGAnimatedLength getHeight()
6526
virtual SVGAnimatedString getResult()
6531
//##################
6533
//##################
6539
SVGFilterPrimitiveStandardAttributes()
6545
SVGFilterPrimitiveStandardAttributes(const SVGFilterPrimitiveStandardAttributes &other)
6546
: SVGStylable(other)
6550
width = other.width;
6551
height = other.height;
6552
result = other.result;
6558
virtual ~SVGFilterPrimitiveStandardAttributes() {}
6562
SVGAnimatedLength x;
6563
SVGAnimatedLength y;
6564
SVGAnimatedLength width;
6565
SVGAnimatedLength height;
6566
SVGAnimatedString result;
6580
/*#########################################################################
6582
#########################################################################*/
6587
class SVGEvent : events::Event
6591
//##################
6593
//##################
6603
SVGEvent(const SVGEvent &other) : events::Event(other)
6609
virtual ~SVGEvent() {}
6616
/*#########################################################################
6618
#########################################################################*/
6623
class SVGZoomEvent : events::UIEvent
6630
virtual SVGRect getZoomRectScreen()
6631
{ return zoomRectScreen; }
6636
virtual double getPreviousScale()
6637
{ return previousScale; }
6642
virtual SVGPoint getPreviousTranslate()
6643
{ return previousTranslate; }
6648
virtual double getNewScale()
6649
{ return newScale; }
6654
virtual SVGPoint getNewTranslate()
6655
{ return newTranslate; }
6659
//##################
6661
//##################
6672
SVGZoomEvent(const SVGZoomEvent &other) : events::Event(other),
6673
events::UIEvent(other)
6675
zoomRectScreen = other.zoomRectScreen;
6676
previousScale = other.previousScale;
6677
previousTranslate = other.previousTranslate;
6678
newScale = other.newScale;
6679
newTranslate = other.newTranslate;
6685
virtual ~SVGZoomEvent() {}
6689
SVGRect zoomRectScreen;
6690
double previousScale;
6691
SVGPoint previousTranslate;
6693
SVGPoint newTranslate;
6699
/*#########################################################################
6700
## SVGElementInstance
6701
#########################################################################*/
6706
class SVGElementInstance : public events::EventTarget
6713
virtual SVGElementPtr getCorrespondingElement()
6714
{ return correspondingElement; }
6719
virtual SVGUseElementPtr getCorrespondingUseElement()
6720
{ return correspondingUseElement; }
6725
virtual SVGElementInstance getParentNode()
6727
SVGElementInstance ret;
6732
* Since we are using stack types and this is a circular definition,
6733
* we will instead implement this as a global function below:
6734
* SVGElementInstanceList getChildNodes(const SVGElementInstance instance);
6736
//virtual SVGElementInstanceList getChildNodes();
6741
virtual SVGElementInstance getFirstChild()
6743
SVGElementInstance ret;
6750
virtual SVGElementInstance getLastChild()
6752
SVGElementInstance ret;
6759
virtual SVGElementInstance getPreviousSibling()
6761
SVGElementInstance ret;
6768
virtual SVGElementInstance getNextSibling()
6770
SVGElementInstance ret;
6775
//##################
6777
//##################
6782
SVGElementInstance() {}
6787
SVGElementInstance(const SVGElementInstance &other)
6788
: events::EventTarget(other)
6795
virtual ~SVGElementInstance() {}
6799
SVGElementPtr correspondingElement;
6800
SVGUseElementPtr correspondingUseElement;
6809
/*#########################################################################
6810
## SVGElementInstanceList
6811
#########################################################################*/
6816
class SVGElementInstanceList
6824
virtual unsigned long getLength()
6825
{ return items.size(); }
6830
virtual SVGElementInstance item (unsigned long index )
6832
if (index >= items.size())
6834
SVGElementInstance ret;
6837
return items[index];
6841
* This static method replaces the circular definition of:
6842
* SVGElementInstanceList SVGElementInstance::getChildNodes()
6845
static SVGElementInstanceList getChildNodes(const SVGElementInstance &/*instance*/)
6847
SVGElementInstanceList list;
6852
//##################
6854
//##################
6859
SVGElementInstanceList() {}
6864
SVGElementInstanceList(const SVGElementInstanceList &other)
6866
items = other.items;
6872
virtual ~SVGElementInstanceList() {}
6876
std::vector<SVGElementInstance> items;
6898
#endif /* __SVGTYPES_H__ */
6899
/*#########################################################################
6900
## E N D O F F I L E
6901
#########################################################################*/