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) 2005-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 defines the main SVG-DOM Node types. Other non-Node types are
39
* defined in svgtypes.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.
62
#define SVG_NAMESPACE "http://www.w3.org/2000/svg"
76
typedef dom::DOMString DOMString;
77
typedef dom::DOMException DOMException;
78
typedef dom::Element Element;
79
typedef dom::ElementPtr ElementPtr;
80
typedef dom::Document Document;
81
typedef dom::DocumentPtr DocumentPtr;
82
typedef dom::NodeList NodeList;
88
typedef Ptr<SVGElement> SVGElementPtr;
90
typedef Ptr<SVGUseElement> SVGUseElementPtr;
92
typedef Ptr<SVGDocument> SVGDocumentPtr;
94
/*#########################################################################
96
#########################################################################*/
110
SVG_WRONG_TYPE_ERR = 0,
111
SVG_INVALID_VALUE_ERR = 1,
112
SVG_MATRIX_NOT_INVERTABLE = 2
124
//########################################################################
125
//########################################################################
127
//########################################################################
128
//########################################################################
134
/*#########################################################################
136
#########################################################################*/
150
SVG_ANGLETYPE_UNKNOWN = 0,
151
SVG_ANGLETYPE_UNSPECIFIED = 1,
152
SVG_ANGLETYPE_DEG = 2,
153
SVG_ANGLETYPE_RAD = 3,
154
SVG_ANGLETYPE_GRAD = 4
160
unsigned short getUnitType();
170
void setValue(double val) throw(DOMException);
175
double getValueInSpecifiedUnits();
180
void setValueInSpecifiedUnits(double /*val*/)
186
DOMString getValueAsString();
191
void setValueAsString(const DOMString &/*val*/)
197
void newValueSpecifiedUnits(unsigned short /*unitType*/,
198
double /*valueInSpecifiedUnits*/);
203
void convertToSpecifiedUnits(unsigned short /*unitType*/);
217
SVGAngle(const SVGAngle &other);
233
/*#########################################################################
235
#########################################################################*/
249
SVG_LENGTHTYPE_UNKNOWN = 0,
250
SVG_LENGTHTYPE_NUMBER = 1,
251
SVG_LENGTHTYPE_PERCENTAGE = 2,
252
SVG_LENGTHTYPE_EMS = 3,
253
SVG_LENGTHTYPE_EXS = 4,
254
SVG_LENGTHTYPE_PX = 5,
255
SVG_LENGTHTYPE_CM = 6,
256
SVG_LENGTHTYPE_MM = 7,
257
SVG_LENGTHTYPE_IN = 8,
258
SVG_LENGTHTYPE_PT = 9,
259
SVG_LENGTHTYPE_PC = 10
265
unsigned short getUnitType();
275
void setValue(double val) throw(DOMException);
280
double getValueInSpecifiedUnits();
285
void setValueInSpecifiedUnits(double /*val*/) throw(DOMException);
290
DOMString getValueAsString();
295
void setValueAsString(const DOMString& /*val*/) throw(DOMException);
300
void newValueSpecifiedUnits(unsigned short /*unitType*/, double /*val*/);
305
void convertToSpecifiedUnits(unsigned short /*unitType*/);
319
SVGLength(const SVGLength &other);
334
/*#########################################################################
336
#########################################################################*/
339
* In SVG, a Matrix is defined like this:
359
void setA(double val) throw(DOMException);
369
void setB(double val) throw(DOMException);
379
void setC(double val) throw(DOMException);
389
void setD(double val) throw(DOMException);
399
void setE(double val) throw(DOMException);
409
void setF(double val) throw(DOMException);
413
* Return the result of postmultiplying this matrix with another.
415
SVGMatrix multiply(const SVGMatrix &other);
418
* Calculate the inverse of this matrix
421
* The determinant of a 3x3 matrix E
422
* (let's use our own notation for a bit)
428
* AEI - AFH - BDI + BFG + CDH - CEG
430
* Since in our affine transforms, G and H==0 and I==1,
433
* In SVG's naming scheme, that is: a * d - c * b . SIMPLE!
435
* In a similar method of attack, SVG's adjunct matrix is:
441
* To get the inverse matrix, we divide the adjunct matrix by
442
* the determinant. Notice that(ad-cb)/(ad-cb)==1. Very cool.
443
* So what we end up with is this:
445
* a = d/(ad-cb) c = -c/(ad-cb) e =(cf-ed)/(ad-cb)
446
* b = -b/(ad-cb) d = a/(ad-cb) f =(eb-af)/(ad-cb)
448
* (Since this would be in all SVG-DOM implementations,
449
* somebody needed to document this! ^^)
452
SVGMatrix inverse() throw(SVGException);
455
* Equivalent to multiplying by:
461
SVGMatrix translate(double x, double y);
464
* Equivalent to multiplying by:
470
SVGMatrix scale(double scale);
473
* Equivalent to multiplying by:
479
SVGMatrix scaleNonUniform(double scaleX, double scaleY);
482
* Equivalent to multiplying by:
483
* | cos(a) -sin(a) 0 |
484
* | sin(a) cos(a) 0 |
488
SVGMatrix rotate(double angle);
491
* Equivalent to multiplying by:
492
* | cos(a) -sin(a) 0 |
493
* | sin(a) cos(a) 0 |
495
* In this case, angle 'a' is computed as the artangent
496
* of the slope y/x . It is negative if the slope is negative.
498
SVGMatrix rotateFromVector(double x, double y) throw(SVGException);
501
* Equivalent to multiplying by:
510
* Equivalent to multiplying by:
524
SVGMatrix skewX(double angle);
527
* Equivalent to multiplying by:
533
SVGMatrix skewY(double angle);
548
SVGMatrix(double aArg, double bArg, double cArg,
549
double dArg, double eArg, double fArg);
554
SVGMatrix(const SVGMatrix &other);
563
friend class SVGTransform;
566
* Set to the identify matrix
570
double a, b, c, d, e, f;
575
/*#########################################################################
577
#########################################################################*/
594
void setValue(double val) throw(DOMException);
608
SVGNumber(const SVGNumber &other);
621
/*#########################################################################
623
#########################################################################*/
640
void setX(double val) throw(DOMException);
650
void setY(double val) throw(DOMException);
655
SVGPoint matrixTransform(const SVGMatrix &/*matrix*/);
669
SVGPoint(const SVGPoint &other);
682
/*#########################################################################
684
#########################################################################*/
699
PATHSEG_CLOSEPATH = 1,
700
PATHSEG_MOVETO_ABS = 2,
701
PATHSEG_MOVETO_REL = 3,
702
PATHSEG_LINETO_ABS = 4,
703
PATHSEG_LINETO_REL = 5,
704
PATHSEG_CURVETO_CUBIC_ABS = 6,
705
PATHSEG_CURVETO_CUBIC_REL = 7,
706
PATHSEG_CURVETO_QUADRATIC_ABS = 8,
707
PATHSEG_CURVETO_QUADRATIC_REL = 9,
708
PATHSEG_ARC_ABS = 10,
709
PATHSEG_ARC_REL = 11,
710
PATHSEG_LINETO_HORIZONTAL_ABS = 12,
711
PATHSEG_LINETO_HORIZONTAL_REL = 13,
712
PATHSEG_LINETO_VERTICAL_ABS = 14,
713
PATHSEG_LINETO_VERTICAL_REL = 15,
714
PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16,
715
PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17,
716
PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18,
717
PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19
723
unsigned short getPathSegType();
728
DOMString getPathSegTypeAsLetter();
731
* From the various subclasses
742
void setX(double val) throw(DOMException);
752
void setX1(double val) throw(DOMException);
762
void setX2(double val) throw(DOMException);
772
void setY(double val) throw(DOMException);
782
void setY1(double val) throw(DOMException);
792
void setY2(double val) throw(DOMException);
802
void setR1(double val) throw(DOMException);
812
void setR2(double val) throw(DOMException);
822
void setAngle(double val) throw(DOMException);
827
bool getLargeArcFlag();
832
void setLargeArcFlag(bool val) throw(DOMException);
842
void setSweepFlag(bool val) throw(DOMException);
857
SVGPathSeg(int typeArg);
862
SVGPathSeg(const SVGPathSeg &other);
867
SVGPathSeg &operator=(const SVGPathSeg &other);
878
void assign(const SVGPathSeg &other);
881
double x, y, x1, y1, x2, y2;
889
/*#########################################################################
890
## SVGPreserveAspectRatio
891
#########################################################################*/
896
class SVGPreserveAspectRatio
906
SVG_PRESERVEASPECTRATIO_UNKNOWN = 0,
907
SVG_PRESERVEASPECTRATIO_NONE = 1,
908
SVG_PRESERVEASPECTRATIO_XMINYMIN = 2,
909
SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3,
910
SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4,
911
SVG_PRESERVEASPECTRATIO_XMINYMID = 5,
912
SVG_PRESERVEASPECTRATIO_XMIDYMID = 6,
913
SVG_PRESERVEASPECTRATIO_XMAXYMID = 7,
914
SVG_PRESERVEASPECTRATIO_XMINYMAX = 8,
915
SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9,
916
SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
921
* Meet-or-slice Types
925
SVG_MEETORSLICE_UNKNOWN = 0,
926
SVG_MEETORSLICE_MEET = 1,
927
SVG_MEETORSLICE_SLICE = 2
934
unsigned short getAlign();
939
void setAlign(unsigned short val) throw(DOMException);
944
unsigned short getMeetOrSlice();
949
void setMeetOrSlice(unsigned short val) throw(DOMException);
958
SVGPreserveAspectRatio();
963
SVGPreserveAspectRatio(const SVGPreserveAspectRatio &other);
968
~SVGPreserveAspectRatio();
972
unsigned short align;
973
unsigned short meetOrSlice;
979
/*#########################################################################
981
#########################################################################*/
998
void setX(double val) throw(DOMException);
1008
void setY(double val) throw(DOMException);
1018
void setWidth(double val) throw(DOMException);
1028
void setHeight(double val) throw(DOMException);
1031
//##################
1033
//##################
1043
SVGRect(const SVGRect &other);
1052
double x, y, width, height;
1056
/*#########################################################################
1058
#########################################################################*/
1072
SVG_TRANSFORM_UNKNOWN = 0,
1073
SVG_TRANSFORM_MATRIX = 1,
1074
SVG_TRANSFORM_TRANSLATE = 2,
1075
SVG_TRANSFORM_SCALE = 3,
1076
SVG_TRANSFORM_ROTATE = 4,
1077
SVG_TRANSFORM_SKEWX = 5,
1078
SVG_TRANSFORM_SKEWY = 6,
1084
unsigned short getType();
1090
SVGMatrix getMatrix();
1100
void setMatrix(const SVGMatrix &matrixArg);
1105
void setTranslate(double tx, double ty);
1110
void setScale(double sx, double sy);
1115
void setRotate(double angleArg, double cx, double cy);
1120
void setSkewX(double angleArg);
1125
void setSkewY(double angleArg);
1128
//##################
1130
//##################
1140
SVGTransform(const SVGTransform &other);
1158
/*#########################################################################
1160
#########################################################################*/
1174
SVG_UNIT_TYPE_UNKNOWN = 0,
1175
SVG_UNIT_TYPE_USERSPACEONUSE = 1,
1176
SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2
1181
//##################
1183
//##################
1200
/*#########################################################################
1202
#########################################################################*/
1205
* This is a helper class that will hold several types of data. It will
1206
* be used in those situations where methods are common to different
1207
* interfaces, except for the data type. This class holds the following:
1214
* SVGPreserveAspectRatio
1233
SVG_PRESERVE_ASPECT_RATIO,
1246
SVGValue(const SVGValue &other);
1251
SVGValue &operator=(const SVGValue &other);
1258
//###########################
1260
//###########################
1265
SVGValue(const SVGAngle &v);
1267
SVGAngle angleValue();
1274
bool booleanValue();
1282
short enumerationValue();
1289
long integerValue();
1294
SVGValue(const SVGLength &v);
1296
SVGLength lengthValue();
1303
double numberValue();
1308
SVGValue(const SVGPathSeg &v);
1310
SVGPathSeg pathDataValue();
1316
SVGValue(const SVGPoint &v);
1318
SVGPoint pointValue();
1322
* PreserveAspectRatio
1324
SVGValue(const SVGPreserveAspectRatio &v);
1326
SVGPreserveAspectRatio preserveAspectRatioValue();
1331
SVGValue(const SVGRect &v);
1333
SVGRect rectValue();
1338
SVGValue(const DOMString &v);
1340
DOMString stringValue();
1345
SVGValue(const SVGTransform &v);
1347
SVGTransform transformValue();
1354
void assign(const SVGValue &other);
1357
SVGAngle angleval; // SVGAngle
1358
bool bval; // SVGBoolean
1359
short eval; // SVGEnumeration
1360
long ival; // SVGInteger
1361
SVGLength lengthval; // SVGLength
1362
double dval; // SVGNumber
1363
SVGPathSeg segval; // SVGPathSeg
1364
SVGPoint pointval; // SVGPoint
1365
SVGPreserveAspectRatio parval; // SVGPreserveAspectRatio
1366
SVGRect rval; // SVGRect
1367
DOMString sval; // SVGString
1368
SVGTransform transformval; // SVGTransform
1373
/*#########################################################################
1375
#########################################################################*/
1378
* THis is used to generify a bit the several different types of lists:
1380
* SVGLengthList -> SVGValueList<SVGLength>
1381
* SVGValueList -> SVGValueList<SVGNumber>
1382
* SVGPathData -> SVGValueList<SVGPathSeg>
1383
* SVGPoints -> SVGValueList<SVGPoint>
1384
* SVGTransformList -> SVGValueList<SVGTransform>
1400
} SVGValueListTypes;
1405
unsigned long getNumberOfItems();
1411
void clear() throw(DOMException);
1416
SVGValue getItem(unsigned long index) throw(DOMException);
1421
SVGValue insertItemBefore(const SVGValue &newItem,
1422
unsigned long index)
1423
throw(DOMException, SVGException);
1428
SVGValue replaceItem(const SVGValue &newItem,
1429
unsigned long index)
1430
throw(DOMException, SVGException);
1435
SVGValue removeItem(unsigned long index) throw(DOMException);
1440
SVGValue appendItem(const SVGValue &newItem)
1441
throw(DOMException, SVGException);
1446
SVGValue initialize(const SVGValue &newItem)
1447
throw(DOMException, SVGException);
1452
SVGValue createSVGTransformFromMatrix(const SVGValue &matrix);
1457
SVGValue consolidate();
1460
//##################
1462
//##################
1472
SVGValueList(const SVGValueList &other);
1481
std::vector<SVGValue> items;
1489
/*#########################################################################
1491
#########################################################################*/
1494
* This class is used to merge all of the "Animated" values, with only
1495
* a different type, into a single API. This class subsumes the following:
1502
* SVGAnimatedPathData
1504
* SVGAnimatedPreserveAspectRatio
1508
class SVGAnimatedValue
1515
SVGValue &getBaseVal();
1520
void setBaseVal(const SVGValue &val) throw (DOMException);
1525
SVGValue &getAnimVal();
1535
SVGAnimatedValue(const SVGValue &baseValue);
1540
SVGAnimatedValue(const SVGValue &baseValue, const SVGValue &animValue);
1545
SVGAnimatedValue(const SVGAnimatedValue &other);
1550
SVGAnimatedValue &operator=(const SVGAnimatedValue &other);
1555
SVGAnimatedValue &operator=(const SVGValue &baseVal);
1560
~SVGAnimatedValue();
1566
void assign(const SVGAnimatedValue &other);
1575
/*#########################################################################
1576
## SVGAnimatedValueList
1577
#########################################################################*/
1580
* This class is used to merge all of the "Animated" values, with only
1581
* a different type, into a single API. This class subsumes the following:
1582
* SVGAnimatedValueList
1583
* SVGAnimatedValueList
1584
* SVGAnimatedTransformList
1586
class SVGAnimatedValueList
1593
SVGValueList &getBaseVal();
1598
void setBaseVal(const SVGValueList &val) throw (DOMException);
1603
SVGValueList &getAnimVal();
1608
SVGAnimatedValueList();
1613
SVGAnimatedValueList(const SVGValueList &baseValue);
1618
SVGAnimatedValueList(const SVGValueList &baseValue, const SVGValueList &animValue);
1623
SVGAnimatedValueList(const SVGAnimatedValueList &other);
1628
SVGAnimatedValueList &operator=(const SVGAnimatedValueList &other);
1633
SVGAnimatedValueList &operator=(const SVGValueList &baseVal);
1638
~SVGAnimatedValueList();
1644
void assign(const SVGAnimatedValueList &other);
1646
SVGValueList baseVal;
1648
SVGValueList animVal;
1654
/*#########################################################################
1656
#########################################################################*/
1668
DOMString getColorProfile();
1673
void setColorProfile(const DOMString &val) throw(DOMException);
1678
SVGValueList &getColors();
1682
//##################
1684
//##################
1694
SVGICCColor(const SVGICCColor &other);
1703
DOMString colorProfile;
1705
SVGValueList colors;
1711
/*#########################################################################
1713
#########################################################################*/
1718
class SVGColor : public css::CSSValue
1728
SVG_COLORTYPE_UNKNOWN = 0,
1729
SVG_COLORTYPE_RGBCOLOR = 1,
1730
SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2,
1731
SVG_COLORTYPE_CURRENTCOLOR = 3
1738
unsigned short getColorType();
1743
css::RGBColor getRgbColor();
1748
SVGICCColor getIccColor();
1754
void setRGBColor(const DOMString& /*rgbColor*/)
1755
throw(SVGException);
1760
void setRGBColorICCColor(const DOMString& /*rgbColor*/,
1761
const DOMString& /*iccColor*/)
1762
throw(SVGException);
1767
void setColor(unsigned short /*colorType*/,
1768
const DOMString& /*rgbColor*/,
1769
const DOMString& /*iccColor*/)
1770
throw(SVGException);
1772
//##################
1774
//##################
1784
SVGColor(const SVGColor &other);
1799
/*#########################################################################
1801
#########################################################################*/
1806
class SVGPaint : public SVGColor
1815
SVG_PAINTTYPE_UNKNOWN = 0,
1816
SVG_PAINTTYPE_RGBCOLOR = 1,
1817
SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2,
1818
SVG_PAINTTYPE_NONE = 101,
1819
SVG_PAINTTYPE_CURRENTCOLOR = 102,
1820
SVG_PAINTTYPE_URI_NONE = 103,
1821
SVG_PAINTTYPE_URI_CURRENTCOLOR = 104,
1822
SVG_PAINTTYPE_URI_RGBCOLOR = 105,
1823
SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106,
1824
SVG_PAINTTYPE_URI = 107
1831
unsigned short getPaintType();
1841
void setUri(const DOMString& uriArg);
1846
void setPaint(unsigned short paintTypeArg,
1847
const DOMString& uriArg,
1848
const DOMString& /*rgbColor*/,
1849
const DOMString& /*iccColor*/)
1850
throw(SVGException);
1852
//##################
1854
//##################
1864
SVGPaint(const SVGPaint &other);
1873
unsigned int paintType;
1881
//########################################################################
1882
//########################################################################
1883
//# I N T E R F A C E S
1884
//########################################################################
1885
//########################################################################
1893
/*#########################################################################
1895
#########################################################################*/
1907
SVGAnimatedValue getClassName();
1912
css::CSSStyleDeclaration getStyle();
1918
css::CSSValue getPresentationAttribute(const DOMString& /*name*/);
1920
//##################
1922
//##################
1932
SVGStylable(const SVGStylable &other);
1941
SVGAnimatedValue className;
1942
css::CSSStyleDeclaration style;
1950
/*#########################################################################
1952
#########################################################################*/
1964
SVGElementPtr getNearestViewportElement();
1969
SVGElementPtr getFarthestViewportElement();
1984
SVGMatrix getScreenCTM();
1989
SVGMatrix getTransformToElement(const SVGElement &/*element*/)
1990
throw(SVGException);
1992
//##################
1994
//##################
2004
SVGLocatable(const SVGLocatable &/*other*/);
2015
SVGMatrix screenCtm;
2020
/*#########################################################################
2022
#########################################################################*/
2027
class SVGTransformable : public SVGLocatable
2035
SVGAnimatedValueList &getTransform();
2037
//##################
2039
//##################
2049
SVGTransformable(const SVGTransformable &other);
2054
~SVGTransformable();
2058
SVGAnimatedValueList transforms;
2063
/*#########################################################################
2065
#########################################################################*/
2077
SVGValueList &getRequiredFeatures();
2082
SVGValueList &getRequiredExtensions();
2087
SVGValueList &getSystemLanguage();
2092
bool hasExtension(const DOMString& /*extension*/);
2094
//##################
2096
//##################
2106
SVGTests(const SVGTests &other);
2115
SVGValueList requiredFeatures;
2116
SVGValueList requiredExtensions;
2117
SVGValueList systemLanguage;
2126
/*#########################################################################
2128
#########################################################################*/
2141
DOMString getXmlLang();
2146
void setXmlLang(const DOMString &val) throw(DOMException);
2151
DOMString getXmlSpace();
2156
void setXmlSpace(const DOMString &val) throw(DOMException);
2158
//##################
2160
//##################
2170
SVGLangSpace(const SVGLangSpace &other);
2186
/*#########################################################################
2187
## SVGExternalResourcesRequired
2188
#########################################################################*/
2193
class SVGExternalResourcesRequired
2200
SVGAnimatedValue getExternalResourcesRequired();
2202
//##################
2204
//##################
2209
SVGExternalResourcesRequired();
2214
SVGExternalResourcesRequired(const SVGExternalResourcesRequired &other);
2219
~SVGExternalResourcesRequired();
2223
SVGAnimatedValue required; //boolean
2235
/*#########################################################################
2237
#########################################################################*/
2242
class SVGFitToViewBox
2249
SVGAnimatedValue getViewBox();
2252
* preserveAspectRatio
2254
SVGAnimatedValue getPreserveAspectRatio();
2256
//##################
2258
//##################
2268
SVGFitToViewBox(const SVGFitToViewBox &other);
2277
SVGAnimatedValue viewBox; //rect
2278
SVGAnimatedValue preserveAspectRatio;
2283
/*#########################################################################
2285
#########################################################################*/
2295
* Zoom and Pan Types
2299
SVG_ZOOMANDPAN_UNKNOWN = 0,
2300
SVG_ZOOMANDPAN_DISABLE = 1,
2301
SVG_ZOOMANDPAN_MAGNIFY = 2
2307
unsigned short getZoomAndPan();
2312
void setZoomAndPan(unsigned short val) throw(DOMException);
2314
//##################
2316
//##################
2326
SVGZoomAndPan(const SVGZoomAndPan &other);
2335
unsigned short zoomAndPan;
2344
/*#########################################################################
2346
#########################################################################*/
2351
class SVGViewSpec : public SVGZoomAndPan,
2352
public SVGFitToViewBox
2359
SVGValueList getTransform();
2364
SVGElementPtr getViewTarget();
2369
DOMString getViewBoxString();
2374
DOMString getPreserveAspectRatioString();
2379
DOMString getTransformString();
2384
DOMString getViewTargetString();
2386
//##################
2388
//##################
2398
SVGViewSpec(const SVGViewSpec &other);
2407
SVGElementPtr viewTarget;
2408
SVGValueList transform;
2412
/*#########################################################################
2414
#########################################################################*/
2419
class SVGURIReference
2426
SVGAnimatedValue getHref();
2428
//##################
2430
//##################
2440
SVGURIReference(const SVGURIReference &other);
2449
SVGAnimatedValue href;
2458
/*#########################################################################
2460
#########################################################################*/
2465
class SVGCSSRule : public css::CSSRule
2471
* Additional CSS RuleType to support ICC color specifications
2475
COLOR_PROFILE_RULE = 7
2476
} ColorProfileRuleType;
2478
//##################
2480
//##################
2490
SVGCSSRule(const SVGCSSRule &other);
2501
/*#########################################################################
2502
## SVGRenderingIntent
2503
#########################################################################*/
2508
class SVGRenderingIntent
2513
* Rendering Intent Types
2517
RENDERING_INTENT_UNKNOWN = 0,
2518
RENDERING_INTENT_AUTO = 1,
2519
RENDERING_INTENT_PERCEPTUAL = 2,
2520
RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3,
2521
RENDERING_INTENT_SATURATION = 4,
2522
RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5
2523
} RenderingIntentType;
2527
//##################
2529
//##################
2534
SVGRenderingIntent();
2539
SVGRenderingIntent(const SVGRenderingIntent &other);
2544
~SVGRenderingIntent();
2548
unsigned short renderingIntentType;
2559
/*#########################################################################
2560
## SVGColorProfileRule
2561
#########################################################################*/
2566
class SVGColorProfileRule : public SVGCSSRule,
2567
public SVGRenderingIntent
2580
void setSrc(const DOMString &val) throw(DOMException);
2585
DOMString getName();
2590
void setName(const DOMString &val) throw(DOMException);
2595
unsigned short getRenderingIntent();
2600
void setRenderingIntent(unsigned short val) throw(DOMException);
2603
//##################
2605
//##################
2610
SVGColorProfileRule();
2615
SVGColorProfileRule(const SVGColorProfileRule &other);
2620
~SVGColorProfileRule();
2624
unsigned short renderingIntent;
2632
/*#########################################################################
2633
## SVGFilterPrimitiveStandardAttributes
2634
#########################################################################*/
2639
class SVGFilterPrimitiveStandardAttributes : public SVGStylable
2646
SVGAnimatedValue getX();
2651
SVGAnimatedValue getY();
2656
SVGAnimatedValue getWidth();
2661
SVGAnimatedValue getHeight();
2666
SVGAnimatedValue getResult();
2668
//##################
2670
//##################
2675
SVGFilterPrimitiveStandardAttributes();
2680
SVGFilterPrimitiveStandardAttributes(
2681
const SVGFilterPrimitiveStandardAttributes &other);
2686
~SVGFilterPrimitiveStandardAttributes();
2692
SVGAnimatedValue width;
2693
SVGAnimatedValue height;
2694
SVGAnimatedValue result;
2699
/*#########################################################################
2701
#########################################################################*/
2706
class SVGEvent : events::Event
2710
//##################
2712
//##################
2722
SVGEvent(const SVGEvent &other);
2734
/*#########################################################################
2736
#########################################################################*/
2741
class SVGZoomEvent : events::UIEvent
2748
SVGRect getZoomRectScreen();
2753
double getPreviousScale();
2758
SVGPoint getPreviousTranslate();
2763
double getNewScale();
2768
SVGPoint getNewTranslate();
2771
//##################
2773
//##################
2783
SVGZoomEvent(const SVGZoomEvent &other);
2792
SVGRect zoomRectScreen;
2793
double previousScale;
2794
SVGPoint previousTranslate;
2796
SVGPoint newTranslate;
2802
/*#########################################################################
2803
## SVGElementInstance
2804
#########################################################################*/
2809
class SVGElementInstance : public events::EventTarget
2816
SVGElementPtr getCorrespondingElement();
2821
SVGUseElementPtr getCorrespondingUseElement();
2826
SVGElementInstance getParentNode();
2829
* Since we are using stack types and this is a circular definition,
2830
* we will instead implement this as a global function below:
2831
* SVGElementInstanceList getChildNodes(const SVGElementInstance instance);
2833
//SVGElementInstanceList getChildNodes();
2838
SVGElementInstance getFirstChild();
2843
SVGElementInstance getLastChild();
2848
SVGElementInstance getPreviousSibling();
2853
SVGElementInstance getNextSibling();
2856
//##################
2858
//##################
2863
SVGElementInstance();
2868
SVGElementInstance(const SVGElementInstance &other);
2873
~SVGElementInstance();
2877
SVGElementPtr correspondingElement;
2878
SVGUseElementPtr correspondingUseElement;
2887
/*#########################################################################
2888
## SVGElementInstanceList
2889
#########################################################################*/
2894
class SVGElementInstanceList
2901
unsigned long getLength();
2906
SVGElementInstance item(unsigned long index);
2909
* This static method replaces the circular definition of:
2910
* SVGElementInstanceList SVGElementInstance::getChildNodes()
2913
static SVGElementInstanceList getChildNodes(const SVGElementInstance &/*instance*/);
2916
//##################
2918
//##################
2923
SVGElementInstanceList();
2928
SVGElementInstanceList(const SVGElementInstanceList &other);
2933
~SVGElementInstanceList();
2937
std::vector<SVGElementInstance> items;
2949
//########################################################################
2950
//########################################################################
2951
//########################################################################
2953
//########################################################################
2954
//########################################################################
2955
//########################################################################
2961
/*#########################################################################
2963
#########################################################################*/
2966
* Bitmasks for has_an interface for SVGElement
2968
#define SVG_ANGLE 0x00000001
2969
#define SVG_ANIMATED_ANGLE 0x00000002
2970
#define SVG_ANIMATED_BOOLEAN 0x00000004
2971
#define SVG_ANIMATED_ENUMERATION 0x00000008
2972
#define SVG_ANIMATED_INTEGER 0x00000010
2973
#define SVG_ANIMATED_LENGTH 0x00000020
2974
#define SVG_ANIMATED_LENGTH_LIST 0x00000040
2975
#define SVG_ANIMATED_NUMBER 0x00000080
2976
#define SVG_ANIMATED_NUMBER_LIST 0x00000100
2977
#define SVG_ANIMATED_RECT 0x00000200
2978
#define SVG_ANIMATED_STRING 0x00000400
2979
#define SVG_COLOR 0x00000800
2980
#define SVG_CSS_RULE 0x00001000
2981
#define SVG_EXTERNAL_RESOURCES_REQUIRED 0x00002000
2982
#define SVG_FIT_TO_VIEWBOX 0x00004000
2983
#define SVG_ICCCOLOR 0x00008000
2984
#define SVG_LANG_SPACE 0x00010000
2985
#define SVG_LENGTH 0x00020000
2986
#define SVG_LENGTH_LIST 0x00040000
2987
#define SVG_LOCATABLE 0x00080000
2988
#define SVG_NUMBER 0x00100000
2989
#define SVG_NUMBER_LIST 0x00200000
2990
#define SVG_RECT 0x00400000
2991
#define SVG_RENDERING_INTENT 0x00800000
2992
#define SVG_STRING_LIST 0x01000000
2993
#define SVG_STYLABLE 0x02000000
2994
#define SVG_TESTS 0x04000000
2995
#define SVG_TRANSFORMABLE 0x08000000
2996
#define SVG_UNIT_TYPES 0x10000000
2997
#define SVG_URI_REFERENCE 0x20000000
2998
#define SVG_VIEW_SPEC 0x40000000
2999
#define SVG_ZOOM_AND_PAN 0x80000000
3002
* How many above? Quite handy
3004
#define SVG_NR_INTERFACES 32
3008
* Enumerations for SVGElement types
3013
SVG_ALTGLYPH_ELEMENT,
3014
SVG_ALTGLYPHDEF_ELEMENT,
3015
SVG_ALTGLYPHITEM_ELEMENT,
3016
SVG_ANIMATE_ELEMENT,
3017
SVG_ANIMATECOLOR_ELEMENT,
3018
SVG_ANIMATEMOTION_ELEMENT,
3019
SVG_ANIMATETRANSFORM_ELEMENT,
3021
SVG_CLIPPATH_ELEMENT,
3022
SVG_COLOR_PROFILE_ELEMENT,
3024
SVG_DEFINITION_SRC_ELEMENT,
3027
SVG_ELLIPSE_ELEMENT,
3028
SVG_FEBLEND_ELEMENT,
3029
SVG_FECOLORMATRIX_ELEMENT,
3030
SVG_FECOMPONENTTRANSFER_ELEMENT,
3031
SVG_FECOMPOSITE_ELEMENT,
3032
SVG_FECONVOLVEMATRIX_ELEMENT,
3033
SVG_FEDIFFUSELIGHTING_ELEMENT,
3034
SVG_FEDISPLACEMENTMAP_ELEMENT,
3035
SVG_FEDISTANTLIGHT_ELEMENT,
3036
SVG_FEFLOOD_ELEMENT,
3037
SVG_FEFUNCA_ELEMENT,
3038
SVG_FEFUNCB_ELEMENT,
3039
SVG_FEFUNCG_ELEMENT,
3040
SVG_FEFUNCR_ELEMENT,
3041
SVG_FEGAUSSIANBLUR_ELEMENT,
3042
SVG_FEIMAGE_ELEMENT,
3043
SVG_FEMERGE_ELEMENT,
3044
SVG_FEMERGENODE_ELEMENT,
3045
SVG_FEMORPHOLOGY_ELEMENT,
3046
SVG_FEOFFSET_ELEMENT,
3047
SVG_FEPOINTLIGHT_ELEMENT,
3048
SVG_FESPECULARLIGHTING_ELEMENT,
3049
SVG_FESPOTLIGHT_ELEMENT,
3051
SVG_FETURBULENCE_ELEMENT,
3054
SVG_FONT_FACE_ELEMENT,
3055
SVG_FONT_FACE_FORMAT_ELEMENT,
3056
SVG_FONT_FACE_NAME_ELEMENT,
3057
SVG_FONT_FACE_SRC_ELEMENT,
3058
SVG_FONT_FACE_URI_ELEMENT,
3059
SVG_FOREIGNOBJECT_ELEMENT,
3062
SVG_GLYPHREF_ELEMENT,
3066
SVG_LINEARGRADIENT_ELEMENT,
3069
SVG_METADATA_ELEMENT,
3070
SVG_MISSING_GLYPH_ELEMENT,
3073
SVG_PATTERN_ELEMENT,
3074
SVG_POLYGON_ELEMENT,
3075
SVG_POLYLINE_ELEMENT,
3076
SVG_RADIALGRADIENT_ELEMENT,
3086
SVG_TEXTPATH_ELEMENT,
3100
* Look up the SVG Element type enum for a given string
3101
* Return -1 if not found
3103
int svgElementStrToEnum(const char *str);
3107
* Return the string corresponding to a given SVG element type enum
3108
* Return "unknown" if not found
3110
const char *svgElementEnumToStr(int type);
3115
/*#########################################################################
3117
#########################################################################*/
3120
* All of the SVG DOM interfaces that correspond directly to elements in the SVG
3121
* language(e.g., the SVGPathElement interface corresponds directly to the
3122
* 'path' element in the language) are derivative from base class SVGElement.
3124
class SVGElement : public Element
3128
//####################################################################
3129
//# BASE METHODS FOR SVGElement
3130
//####################################################################
3133
* Get the value of the id attribute on the given element.
3138
* Set the value of the id attribute on the given element.
3140
void setId(const DOMString &val) throw(DOMException);
3143
* Corresponds to attribute xml:base on the given element.
3145
DOMString getXmlBase();
3148
* Corresponds to attribute xml:base on the given element.
3150
void setXmlBase(const DOMString &val) throw(DOMException);
3153
* The nearest ancestor 'svg' element. Null if the given element is the
3154
* outermost 'svg' element.
3156
SVGElementPtr getOwnerSVGElement();
3159
* The element which established the current viewport. Often, the nearest
3160
* ancestor 'svg' element. Null if the given element is the outermost 'svg'
3163
SVGElementPtr getViewportElement();
3167
//####################################################################
3168
//####################################################################
3170
//####################################################################
3171
//####################################################################
3173
//####################################################################
3175
//####################################################################
3181
SVGAnimatedValue getTarget();
3185
//####################################################################
3186
//# SVGAltGlyphElement
3187
//####################################################################
3191
* Get the attribute glyphRef on the given element.
3193
DOMString getGlyphRef();
3196
* Set the attribute glyphRef on the given element.
3198
void setGlyphRef(const DOMString &val) throw(DOMException);
3201
* Get the attribute format on the given element.
3203
DOMString getFormat();
3206
* Set the attribute format on the given element.
3208
void setFormat(const DOMString &val) throw(DOMException);
3211
//####################################################################
3212
//# SVGAltGlyphDefElement
3213
//####################################################################
3215
//####################################################################
3216
//# SVGAltGlyphItemElement
3217
//####################################################################
3220
//####################################################################
3221
//# SVGAnimateElement
3222
//####################################################################
3225
//####################################################################
3226
//# SVGAnimateColorElement
3227
//####################################################################
3229
//####################################################################
3230
//# SVGAnimateMotionElement
3231
//####################################################################
3234
//####################################################################
3235
//# SVGAnimateTransformElement
3236
//####################################################################
3239
//####################################################################
3240
//# SVGAnimationElement
3241
//####################################################################
3247
SVGElementPtr getTargetElement();
3252
double getStartTime();
3257
double getCurrentTime();
3262
double getSimpleDuration() throw(DOMException);
3266
//####################################################################
3267
//# SVGCircleElement
3268
//####################################################################
3271
* Corresponds to attribute cx on the given 'circle' element.
3273
SVGAnimatedValue getCx();
3276
* Corresponds to attribute cy on the given 'circle' element.
3278
SVGAnimatedValue getCy();
3281
* Corresponds to attribute r on the given 'circle' element.
3283
SVGAnimatedValue getR();
3285
//####################################################################
3286
//# SVGClipPathElement
3287
//####################################################################
3291
* Corresponds to attribute clipPathUnits on the given 'clipPath' element.
3292
* Takes one of the constants defined in SVGUnitTypes.
3294
SVGAnimatedValue getClipPathUnits();
3298
//####################################################################
3299
//# SVGColorProfileElement
3300
//####################################################################
3304
* Get the attribute local on the given element.
3306
DOMString getLocal();
3309
* Set the attribute local on the given element.
3311
void setLocal(const DOMString &val) throw(DOMException);
3314
* Get the attribute name on the given element.
3316
DOMString getName();
3319
* Set the attribute name on the given element.
3321
void setName(const DOMString &val) throw(DOMException);
3324
* Set the attribute rendering-intent on the given element.
3325
* The type of rendering intent, identified by one of the
3326
* SVGRenderingIntent constants.
3328
unsigned short getRenderingIntent();
3331
* Get the attribute rendering-intent on the given element.
3333
void setRenderingIntent(unsigned short val) throw(DOMException);
3336
//####################################################################
3337
//# SVGComponentTransferFunctionElement
3338
//####################################################################
3342
* Component Transfer Types
3346
SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0,
3347
SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1,
3348
SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2,
3349
SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3,
3350
SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4,
3351
SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5
3352
} ComponentTransferType;
3356
* Corresponds to attribute type on the given element. Takes one\
3357
* of the Component Transfer Types.
3358
* -- also in SVGCSSRule
3360
// SVGAnimatedValue getType();
3363
* Corresponds to attribute tableValues on the given element.
3365
SVGAnimatedValueList getTableValues();
3368
* Corresponds to attribute slope on the given element.
3370
SVGAnimatedValue getSlope();
3373
* Corresponds to attribute intercept on the given element.
3375
SVGAnimatedValue getIntercept();
3378
* Corresponds to attribute amplitude on the given element.
3380
SVGAnimatedValue getAmplitude();
3383
* Corresponds to attribute exponent on the given element.
3385
SVGAnimatedValue getExponent();
3388
* Corresponds to attribute offset on the given element.
3390
SVGAnimatedValue getOffset();
3392
//####################################################################
3393
//# SVGCursorElement
3394
//####################################################################
3397
* -- also in SVGRect
3399
// SVGAnimatedValue getX();
3402
* -- also in SVGRect
3404
// SVGAnimatedValue getY();
3407
//####################################################################
3408
//# SVGDefinitionSrcElement
3409
//####################################################################
3411
//####################################################################
3413
//####################################################################
3415
//####################################################################
3417
//####################################################################
3419
//####################################################################
3420
//# SVGEllipseElement
3421
//####################################################################
3424
* Corresponds to attribute cx on the given 'ellipse' element.
3427
// SVGAnimatedValue getCx();
3430
* Corresponds to attribute cy on the given 'ellipse' element.
3433
// SVGAnimatedValue getCy();
3436
* Corresponds to attribute rx on the given 'ellipse' element.
3438
SVGAnimatedValue getRx();
3441
* Corresponds to attribute ry on the given 'ellipse' element.
3443
SVGAnimatedValue getRy();
3446
//####################################################################
3447
//# SVGFEBlendElement
3448
//####################################################################
3455
SVG_FEBLEND_MODE_UNKNOWN = 0,
3456
SVG_FEBLEND_MODE_NORMAL = 1,
3457
SVG_FEBLEND_MODE_MULTIPLY = 2,
3458
SVG_FEBLEND_MODE_SCREEN = 3,
3459
SVG_FEBLEND_MODE_DARKEN = 4,
3460
SVG_FEBLEND_MODE_LIGHTEN = 5
3464
* Corresponds to attribute in on the given 'feBlend' element.
3466
SVGAnimatedValue getIn1();
3469
* Corresponds to attribute in2 on the given 'feBlend' element.
3471
SVGAnimatedValue getIn2();
3474
* Corresponds to attribute mode on the given 'feBlend' element.
3475
* Takes one of the Blend Mode Types.
3477
SVGAnimatedValue getMode();
3480
//####################################################################
3481
//# SVGFEColorMatrixElement
3482
//####################################################################
3485
* Color Matrix Types
3489
SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0,
3490
SVG_FECOLORMATRIX_TYPE_MATRIX = 1,
3491
SVG_FECOLORMATRIX_TYPE_SATURATE = 2,
3492
SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3,
3493
SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4
3498
* Corresponds to attribute in on the given 'feColorMatrix' element.
3501
// SVGAnimatedValue getIn1();
3504
* Corresponds to attribute type on the given 'feColorMatrix' element.
3505
* Takes one of the Color Matrix Types.
3506
* -- also in CSSRule
3508
// SVGAnimatedValue getType();
3511
* Corresponds to attribute values on the given 'feColorMatrix' element.
3512
* Provides access to the contents of the values attribute.
3514
SVGAnimatedValueList getValues();
3517
//####################################################################
3518
//# SVGFEComponentTransferElement
3519
//####################################################################
3523
* Corresponds to attribute in on the given 'feComponentTransfer' element.
3524
* -- also in feBlend
3526
// SVGAnimatedValue getIn1();
3528
//####################################################################
3529
//# SVGFECompositeElement
3530
//####################################################################
3533
* Composite Operators
3537
SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0,
3538
SVG_FECOMPOSITE_OPERATOR_OVER = 1,
3539
SVG_FECOMPOSITE_OPERATOR_IN = 2,
3540
SVG_FECOMPOSITE_OPERATOR_OUT = 3,
3541
SVG_FECOMPOSITE_OPERATOR_ATOP = 4,
3542
SVG_FECOMPOSITE_OPERATOR_XOR = 5,
3543
SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6
3544
} CompositeOperatorType;
3547
* Corresponds to attribute in on the given 'feComposite' element.
3548
* -- also in feBlend
3550
// SVGAnimatedValue getIn1();
3553
* Corresponds to attribute in2 on the given 'feComposite' element.
3554
* -- also in feBlend
3556
// SVGAnimatedValue getIn2();
3559
* Corresponds to attribute operator on the given 'feComposite' element.
3560
* Takes one of the Composite Operators.
3562
SVGAnimatedValue getOperator();
3565
* Corresponds to attribute k1 on the given 'feComposite' element.
3567
SVGAnimatedValue getK1();
3570
* Corresponds to attribute k2 on the given 'feComposite' element.
3572
SVGAnimatedValue getK2();
3575
* Corresponds to attribute k3 on the given 'feComposite' element.
3577
SVGAnimatedValue getK3();
3580
* Corresponds to attribute k4 on the given 'feComposite' element.
3582
SVGAnimatedValue getK4();
3585
//####################################################################
3586
//# SVGFEConvolveMatrixElement
3587
//####################################################################
3595
SVG_EDGEMODE_UNKNOWN = 0,
3596
SVG_EDGEMODE_DUPLICATE = 1,
3597
SVG_EDGEMODE_WRAP = 2,
3598
SVG_EDGEMODE_NONE = 3
3603
* Corresponds to attribute order on the given 'feConvolveMatrix' element.
3605
SVGAnimatedValue getOrderX();
3608
* Corresponds to attribute order on the given 'feConvolveMatrix' element.
3610
SVGAnimatedValue getOrderY();
3613
* Corresponds to attribute kernelMatrix on the given element.
3615
SVGAnimatedValueList getKernelMatrix();
3618
* Corresponds to attribute divisor on the given 'feConvolveMatrix' element.
3620
SVGAnimatedValue getDivisor();
3623
* Corresponds to attribute bias on the given 'feConvolveMatrix' element.
3625
SVGAnimatedValue getBias();
3628
* Corresponds to attribute targetX on the given 'feConvolveMatrix' element.
3630
SVGAnimatedValue getTargetX();
3633
* Corresponds to attribute targetY on the given 'feConvolveMatrix' element.
3635
SVGAnimatedValue getTargetY();
3638
* Corresponds to attribute edgeMode on the given 'feConvolveMatrix'
3639
* element. Takes one of the Edge Mode Types.
3641
SVGAnimatedValue getEdgeMode();
3644
* Corresponds to attribute kernelUnitLength on the
3645
* given 'feConvolveMatrix' element.
3647
SVGAnimatedValue getKernelUnitLengthX();
3650
* Corresponds to attribute kernelUnitLength on the given
3651
* 'feConvolveMatrix' element.
3653
SVGAnimatedValue getKernelUnitLengthY();
3656
* Corresponds to attribute preserveAlpha on the
3657
* given 'feConvolveMatrix' element.
3659
SVGAnimatedValue getPreserveAlpha();
3663
//####################################################################
3664
//# SVGFEDiffuseLightingElement
3665
//####################################################################
3669
* Corresponds to attribute in on the given 'feDiffuseLighting' element.
3670
* -- also in feBlend
3672
// SVGAnimatedValue getIn1();
3675
* Corresponds to attribute surfaceScale on the given
3676
* 'feDiffuseLighting' element.
3678
SVGAnimatedValue getSurfaceScale();
3681
* Corresponds to attribute diffuseConstant on the given
3682
* 'feDiffuseLighting' element.
3684
SVGAnimatedValue getDiffuseConstant();
3687
* Corresponds to attribute kernelUnitLength on the given
3688
* 'feDiffuseLighting' element.
3690
// SVGAnimatedValue getKernelUnitLengthX();
3693
* Corresponds to attribute kernelUnitLength on the given
3694
* 'feDiffuseLighting' element.
3696
// SVGAnimatedValue getKernelUnitLengthY();
3701
//####################################################################
3702
//# SVGFEDisplacementMapElement
3703
//####################################################################
3711
SVG_CHANNEL_UNKNOWN = 0,
3720
* -- also in feBlend
3722
// SVGAnimatedValue getIn1();
3726
* -- also in feBlend
3728
// SVGAnimatedValue getIn2();
3734
SVGAnimatedValue getScale();
3739
SVGAnimatedValue getXChannelSelector();
3744
SVGAnimatedValue getYChannelSelector();
3746
//####################################################################
3747
//# SVGFEDistantLightElement
3748
//####################################################################
3752
* Corresponds to attribute azimuth on the given 'feDistantLight' element.
3754
SVGAnimatedValue getAzimuth();
3758
* Corresponds to attribute elevation on the given 'feDistantLight'
3761
SVGAnimatedValue getElevation();
3764
//####################################################################
3765
//# SVGFEFloodElement
3766
//####################################################################
3771
* -- also in feBlend
3773
// SVGAnimatedValue getIn1();
3776
//####################################################################
3777
//# SVGFEFuncAElement
3778
//####################################################################
3780
//####################################################################
3781
//# SVGFEFuncBElement
3782
//####################################################################
3784
//####################################################################
3785
//# SVGFEFuncGElement
3786
//####################################################################
3788
//####################################################################
3789
//# SVGFEFuncRElement
3790
//####################################################################
3793
//####################################################################
3794
//# SVGFEGaussianBlurElement
3795
//####################################################################
3800
* -- also in feBlend
3802
// SVGAnimatedValue getIn1();
3808
SVGAnimatedValue getStdDeviationX();
3813
SVGAnimatedValue getStdDeviationY();
3819
void setStdDeviation(double stdDeviationX, double stdDeviationY);
3822
//####################################################################
3823
//# SVGFEImageElement
3824
//####################################################################
3827
//####################################################################
3828
//# SVGFEMergeElement
3829
//####################################################################
3831
//####################################################################
3832
//# SVGFEMergeNodeElement
3833
//####################################################################
3835
//####################################################################
3836
//# SVGFEMorphologyElement
3837
//####################################################################
3842
* Morphology Operators
3846
SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0,
3847
SVG_MORPHOLOGY_OPERATOR_ERODE = 1,
3848
SVG_MORPHOLOGY_OPERATOR_DILATE = 2
3849
} MorphologyOperatorType;
3854
* -- also in feBlend
3856
// SVGAnimatedValue getIn1();
3862
// SVGAnimatedValue getOperator();
3867
SVGAnimatedValue getRadiusX();
3872
SVGAnimatedValue getRadiusY();
3874
//####################################################################
3875
//# SVGFEOffsetElement
3876
//####################################################################
3880
* -- also in feBlend
3882
// SVGAnimatedValue getIn1();
3887
SVGAnimatedValue getDx();
3892
SVGAnimatedValue getDy();
3895
//####################################################################
3896
//# SVGFEPointLightElement
3897
//####################################################################
3900
* Corresponds to attribute x on the given 'fePointLight' element.
3902
SVGAnimatedValue getX();
3905
* Corresponds to attribute y on the given 'fePointLight' element.
3907
SVGAnimatedValue getY();
3910
* Corresponds to attribute z on the given 'fePointLight' element.
3912
SVGAnimatedValue getZ();
3914
//####################################################################
3915
//# SVGFESpecularLightingElement
3916
//####################################################################
3921
* -- also in feBlend
3923
// SVGAnimatedValue getIn1();
3928
// SVGAnimatedValue getSurfaceScale();
3933
SVGAnimatedValue getSpecularConstant();
3938
SVGAnimatedValue getSpecularExponent();
3941
//####################################################################
3942
//# SVGFESpotLightElement
3943
//####################################################################
3946
* Corresponds to attribute x on the given 'feSpotLight' element.
3948
// SVGAnimatedValue getX();
3951
* Corresponds to attribute y on the given 'feSpotLight' element.
3953
// SVGAnimatedValue getY();
3956
* Corresponds to attribute z on the given 'feSpotLight' element.
3958
// SVGAnimatedValue getZ();
3961
* Corresponds to attribute pointsAtX on the given 'feSpotLight' element.
3963
SVGAnimatedValue getPointsAtX();
3966
* Corresponds to attribute pointsAtY on the given 'feSpotLight' element.
3968
SVGAnimatedValue getPointsAtY();
3971
* Corresponds to attribute pointsAtZ on the given 'feSpotLight' element.
3973
SVGAnimatedValue getPointsAtZ();
3976
* Corresponds to attribute specularExponent on the
3977
* given 'feSpotLight' element.
3979
// SVGAnimatedValue getSpecularExponent();
3982
* Corresponds to attribute limitingConeAngle on the
3983
* given 'feSpotLight' element.
3985
SVGAnimatedValue getLimitingConeAngle();
3988
//####################################################################
3989
//# SVGFETileElement
3990
//####################################################################
3995
* -- also in feBlend
3997
// SVGAnimatedValue getIn1();
4000
//####################################################################
4001
//# SVGFETurbulenceElement
4002
//####################################################################
4010
SVG_TURBULENCE_TYPE_UNKNOWN = 0,
4011
SVG_TURBULENCE_TYPE_FRACTALNOISE = 1,
4012
SVG_TURBULENCE_TYPE_TURBULENCE = 2
4020
SVG_STITCHTYPE_UNKNOWN = 0,
4021
SVG_STITCHTYPE_STITCH = 1,
4022
SVG_STITCHTYPE_NOSTITCH = 2
4030
SVGAnimatedValue getBaseFrequencyX();
4035
SVGAnimatedValue getBaseFrequencyY();
4040
SVGAnimatedValue getNumOctaves();
4045
SVGAnimatedValue getSeed();
4050
SVGAnimatedValue getStitchTiles();
4055
SVGAnimatedValue getType();
4059
//####################################################################
4060
//# SVGFilterElement
4061
//####################################################################
4065
* Corresponds to attribute filterUnits on the given 'filter' element. Takes one
4066
* of the constants defined in SVGUnitTypes.
4068
SVGAnimatedValue getFilterUnits();
4071
* Corresponds to attribute primitiveUnits on the given 'filter' element. Takes
4072
* one of the constants defined in SVGUnitTypes.
4074
SVGAnimatedValue getPrimitiveUnits();
4079
// SVGAnimatedValue getX();
4082
* Corresponds to attribute x on the given 'filter' element.
4084
// SVGAnimatedValue getY();
4087
* Corresponds to attribute y on the given 'filter' element.
4089
// SVGAnimatedValue getWidth();
4092
* Corresponds to attribute height on the given 'filter' element.
4094
// SVGAnimatedValue getHeight();
4098
* Corresponds to attribute filterRes on the given 'filter' element.
4099
* Contains the X component of attribute filterRes.
4101
SVGAnimatedValue getFilterResX();
4104
* Corresponds to attribute filterRes on the given 'filter' element.
4105
* Contains the Y component(possibly computed automatically)
4106
* of attribute filterRes.
4108
SVGAnimatedValue getFilterResY();
4111
* Sets the values for attribute filterRes.
4113
void setFilterRes(unsigned long filterResX, unsigned long filterResY);
4116
//####################################################################
4118
//####################################################################
4120
//####################################################################
4121
//# SVGFontFaceElement
4122
//####################################################################
4124
//####################################################################
4125
//# SVGFontFaceFormatElement
4126
//####################################################################
4128
//####################################################################
4129
//# SVGFontFaceNameElement
4130
//####################################################################
4132
//####################################################################
4133
//# SVGFontFaceSrcElement
4134
//####################################################################
4136
//####################################################################
4137
//# SVGFontFaceUriElement
4138
//####################################################################
4140
//####################################################################
4141
//# SVGForeignObjectElement
4142
//####################################################################
4147
// SVGAnimatedValue getX();
4152
// SVGAnimatedValue getY();
4157
// SVGAnimatedValue getWidth();
4162
// SVGAnimatedValue getHeight();
4166
//####################################################################
4167
//# SVGGlyphRefElement
4168
//####################################################################
4172
* Get the attribute glyphRef on the given element.
4174
// DOMString getGlyphRef();
4177
* Set the attribute glyphRef on the given element.
4179
// void setGlyphRef(const DOMString &val) throw(DOMException);
4182
* Get the attribute format on the given element.
4184
// DOMString getFormat();
4187
* Set the attribute format on the given element.
4189
// void setFormat(const DOMString &val) throw(DOMException);
4192
* Get the attribute x on the given element.
4197
* Set the attribute x on the given element.
4199
// void setX(double val) throw(DOMException);
4202
* Get the attribute y on the given element.
4207
* Set the attribute y on the given element.
4209
// void setY(double val) throw(DOMException);
4212
* Get the attribute dx on the given element.
4217
* Set the attribute dx on the given element.
4219
// void setDx(double val) throw(DOMException);
4222
* Get the attribute dy on the given element.
4227
* Set the attribute dy on the given element.
4229
// void setDy(double val) throw(DOMException);
4232
//####################################################################
4233
//# SVGGradientElement
4234
//####################################################################
4238
* Spread Method Types
4242
SVG_SPREADMETHOD_UNKNOWN = 0,
4243
SVG_SPREADMETHOD_PAD = 1,
4244
SVG_SPREADMETHOD_REFLECT = 2,
4245
SVG_SPREADMETHOD_REPEAT = 3
4250
* Corresponds to attribute gradientUnits on the given element.
4251
* Takes one of the constants defined in SVGUnitTypes.
4253
SVGAnimatedValue &getGradientUnits();
4256
* Corresponds to attribute gradientTransform on the given element.
4258
SVGAnimatedValueList &getGradientTransform();
4261
* Corresponds to attribute spreadMethod on the given element.
4262
* One of the Spread Method Types.
4264
SVGAnimatedValue &getSpreadMethod();
4268
//####################################################################
4270
//####################################################################
4272
//####################################################################
4274
//####################################################################
4277
* Corresponds to attribute x on the given 'image' element.
4279
// SVGAnimatedValue getX();
4282
* Corresponds to attribute y on the given 'image' element.
4284
// SVGAnimatedValue getY();
4287
* Corresponds to attribute width on the given 'image' element.
4289
// SVGAnimatedValue getWidth();
4292
* Corresponds to attribute height on the given 'image' element.
4294
// SVGAnimatedValue getHeight();
4298
* Corresponds to attribute preserveAspectRatio on the given element.
4300
// SVGAnimatedPreserveAspectRatio getPreserveAspectRatio();
4302
//####################################################################
4303
//# SVGLinearGradientElement
4304
//####################################################################
4307
* Corresponds to attribute x1 on the given 'linearGradient' element.
4309
// SVGAnimatedValue getX1();
4312
* Corresponds to attribute y1 on the given 'linearGradient' element.
4314
// SVGAnimatedValue getY1();
4317
* Corresponds to attribute x2 on the given 'linearGradient' element.
4319
// SVGAnimatedValue getX2();
4322
* Corresponds to attribute y2 on the given 'linearGradient' element.
4324
// SVGAnimatedValue getY2();
4328
//####################################################################
4330
//####################################################################
4333
* Corresponds to attribute x1 on the given 'line' element.
4335
// SVGAnimatedValue getX1();
4338
* Corresponds to attribute y1 on the given 'line' element.
4340
// SVGAnimatedValue getY1();
4343
* Corresponds to attribute x2 on the given 'line' element.
4345
// SVGAnimatedValue getX2();
4348
* Corresponds to attribute y2 on the given 'line' element.
4350
// SVGAnimatedValue getY2();
4353
//####################################################################
4354
//# SVGMarkerElement
4355
//####################################################################
4363
SVG_MARKERUNITS_UNKNOWN = 0,
4364
SVG_MARKERUNITS_USERSPACEONUSE = 1,
4365
SVG_MARKERUNITS_STROKEWIDTH = 2
4369
* Marker Orientation Types
4373
SVG_MARKER_ORIENT_UNKNOWN = 0,
4374
SVG_MARKER_ORIENT_AUTO = 1,
4375
SVG_MARKER_ORIENT_ANGLE = 2
4376
} MarkerOrientationType;
4380
* Corresponds to attribute refX on the given 'marker' element.
4382
SVGAnimatedValue getRefX();
4385
* Corresponds to attribute refY on the given 'marker' element.
4387
SVGAnimatedValue getRefY();
4390
* Corresponds to attribute markerUnits on the given 'marker' element.
4391
* One of the Marker Units Types defined above.
4393
SVGAnimatedValue getMarkerUnits();
4396
* Corresponds to attribute markerWidth on the given 'marker' element.
4398
SVGAnimatedValue getMarkerWidth();
4401
* Corresponds to attribute markerHeight on the given 'marker' element.
4403
SVGAnimatedValue getMarkerHeight();
4406
* Corresponds to attribute orient on the given 'marker' element.
4407
* One of the Marker Orientation Types defined above.
4409
SVGAnimatedValue getOrientType();
4412
* Corresponds to attribute orient on the given 'marker' element.
4413
* If markerUnits is SVG_MARKER_ORIENT_ANGLE, the angle value for
4414
* attribute orient; otherwise, it will be set to zero.
4416
SVGAnimatedValue getOrientAngle();
4420
* Sets the value of attribute orient to 'auto'.
4422
void setOrientToAuto();
4425
* Sets the value of attribute orient to the given angle.
4427
void setOrientToAngle(const SVGAngle &angle);
4430
//####################################################################
4432
//####################################################################
4436
* Corresponds to attribute maskUnits on the given 'mask' element. Takes one of
4437
* the constants defined in SVGUnitTypes.
4439
SVGAnimatedValue getMaskUnits();
4442
* Corresponds to attribute maskContentUnits on the given 'mask' element. Takes
4443
* one of the constants defined in SVGUnitTypes.
4445
SVGAnimatedValue getMaskContentUnits();
4448
* Corresponds to attribute x on the given 'mask' element.
4450
// SVGAnimatedValue getX();
4453
* Corresponds to attribute y on the given 'mask' element.
4455
// SVGAnimatedValue getY();
4458
* Corresponds to attribute width on the given 'mask' element.
4460
// SVGAnimatedValue getWidth();
4463
* Corresponds to attribute height on the given 'mask' element.
4465
// SVGAnimatedValue getHeight();
4467
//####################################################################
4468
//# SVGMetadataElement
4469
//####################################################################
4471
//####################################################################
4472
//# SVGMissingGlyphElement
4473
//####################################################################
4476
//####################################################################
4478
//####################################################################
4481
* Corresponds to attribute pathLength on the given 'path' element.
4483
SVGAnimatedValue getPathLength();
4486
* Returns the user agent's computed value for the total length of the path using
4487
* the user agent's distance-along-a-path algorithm, as a distance in the current
4488
* user coordinate system.
4490
double getTotalLength();
4493
* Returns the(x,y) coordinate in user space which is distance units along the
4494
* path, utilizing the user agent's distance-along-a-path algorithm.
4496
SVGPoint getPointAtLength(double distance);
4499
* Returns the index into pathSegList which is distance units along the path,
4500
* utilizing the user agent's distance-along-a-path algorithm.
4502
unsigned long getPathSegAtLength(double distance);
4505
* Returns a stand-alone, parentless SVGPathSegClosePath object.
4507
SVGPathSeg createSVGPathSegClosePath();
4510
* Returns a stand-alone, parentless SVGPathSegMovetoAbs object.
4512
SVGPathSeg createSVGPathSegMovetoAbs(double x, double y);
4515
* Returns a stand-alone, parentless SVGPathSegMovetoRel object.
4517
SVGPathSeg createSVGPathSegMovetoRel(double x, double y);
4520
* Returns a stand-alone, parentless SVGPathSegLinetoAbs object.
4522
SVGPathSeg createSVGPathSegLinetoAbs(double x, double y);
4525
* Returns a stand-alone, parentless SVGPathSegLinetoRel object.
4527
SVGPathSeg createSVGPathSegLinetoRel(double x, double y);
4530
* Returns a stand-alone, parentless SVGPathSegCurvetoCubicAbs object.
4532
SVGPathSeg createSVGPathSegCurvetoCubicAbs(double x, double y,
4533
double x1, double y1, double x2, double y2);
4536
* Returns a stand-alone, parentless SVGPathSegCurvetoCubicRel object.
4538
SVGPathSeg createSVGPathSegCurvetoCubicRel(double x, double y,
4539
double x1, double y1, double x2, double y2);
4542
* Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticAbs object.
4544
SVGPathSeg createSVGPathSegCurvetoQuadraticAbs(double x, double y,
4545
double x1, double y1);
4548
* Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticRel object.
4550
SVGPathSeg createSVGPathSegCurvetoQuadraticRel(double x, double y,
4551
double x1, double y1);
4554
* Returns a stand-alone, parentless SVGPathSegArcAbs object.
4556
SVGPathSeg createSVGPathSegArcAbs(double x, double y,
4557
double r1, double r2, double angle,
4558
bool largeArcFlag, bool sweepFlag);
4561
* Returns a stand-alone, parentless SVGPathSegArcRel object.
4563
SVGPathSeg createSVGPathSegArcRel(double x, double y, double r1,
4564
double r2, double angle, bool largeArcFlag,
4568
* Returns a stand-alone, parentless SVGPathSegLinetoHorizontalAbs object.
4570
SVGPathSeg createSVGPathSegLinetoHorizontalAbs(double x);
4573
* Returns a stand-alone, parentless SVGPathSegLinetoHorizontalRel object.
4575
SVGPathSeg createSVGPathSegLinetoHorizontalRel(double x);
4578
* Returns a stand-alone, parentless SVGPathSegLinetoVerticalAbs object.
4580
SVGPathSeg createSVGPathSegLinetoVerticalAbs(double y);
4583
* Returns a stand-alone, parentless SVGPathSegLinetoVerticalRel object.
4585
SVGPathSeg createSVGPathSegLinetoVerticalRel(double y);
4588
* Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothAbs object.
4590
SVGPathSeg createSVGPathSegCurvetoCubicSmoothAbs(double x, double y,
4591
double x2, double y2);
4594
* Returns a stand-alone, parentless SVGPathSegCurvetoCubicSmoothRel object.
4596
SVGPathSeg createSVGPathSegCurvetoCubicSmoothRel(double x, double y,
4597
double x2, double y2);
4600
* Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothAbs
4603
SVGPathSeg createSVGPathSegCurvetoQuadraticSmoothAbs(double x, double y);
4606
* Returns a stand-alone, parentless SVGPathSegCurvetoQuadraticSmoothRel
4609
SVGPathSeg createSVGPathSegCurvetoQuadraticSmoothRel(double x, double y);
4611
//####################################################################
4613
//####################################################################
4615
//####################################################################
4616
//# SVGPatternElement
4617
//####################################################################
4620
* Corresponds to attribute patternUnits on the given 'pattern' element.
4621
* Takes one of the constants defined in SVGUnitTypes.
4623
SVGAnimatedValue getPatternUnits();
4626
* Corresponds to attribute patternContentUnits on the given 'pattern'
4627
* element. Takes one of the constants defined in SVGUnitTypes.
4629
SVGAnimatedValue getPatternContentUnits();
4632
* Corresponds to attribute patternTransform on the given 'pattern' element.
4634
SVGAnimatedValueList &getPatternTransform();
4637
* Corresponds to attribute x on the given 'pattern' element.
4639
// SVGAnimatedValue getX();
4644
// SVGAnimatedValue getY();
4647
* Corresponds to attribute width on the given 'pattern' element.
4649
// SVGAnimatedValue getWidth();
4652
* Corresponds to attribute height on the given 'pattern' element.
4654
// SVGAnimatedValue getHeight();
4657
//####################################################################
4658
//# SVGPolyLineElement
4659
//####################################################################
4661
//####################################################################
4662
//# SVGPolygonElement
4663
//####################################################################
4665
//####################################################################
4666
//# SVGRadialGradientElement
4667
//####################################################################
4671
* Corresponds to attribute cx on the given 'radialGradient' element.
4673
// SVGAnimatedValue getCx();
4677
* Corresponds to attribute cy on the given 'radialGradient' element.
4679
// SVGAnimatedValue getCy();
4683
* Corresponds to attribute r on the given 'radialGradient' element.
4685
// SVGAnimatedValue getR();
4689
* Corresponds to attribute fx on the given 'radialGradient' element.
4691
SVGAnimatedValue getFx();
4695
* Corresponds to attribute fy on the given 'radialGradient' element.
4697
SVGAnimatedValue getFy();
4700
//####################################################################
4702
//####################################################################
4705
* Corresponds to attribute x on the given 'rect' element.
4707
// SVGAnimatedValue getX();
4710
* Corresponds to attribute y on the given 'rect' element.
4712
// SVGAnimatedValue getY();
4715
* Corresponds to attribute width on the given 'rect' element.
4717
// SVGAnimatedValue getWidth();
4720
* Corresponds to attribute height on the given 'rect' element.
4722
// SVGAnimatedValue getHeight();
4726
* Corresponds to attribute rx on the given 'rect' element.
4728
// SVGAnimatedValue getRx();
4731
* Corresponds to attribute ry on the given 'rect' element.
4733
// SVGAnimatedValue getRy();
4736
//####################################################################
4737
//# SVGScriptElement
4738
//####################################################################
4743
// DOMString getType();
4748
// void setType(const DOMString &val) throw(DOMException);
4750
//####################################################################
4752
//####################################################################
4754
//####################################################################
4756
//####################################################################
4760
* Corresponds to attribute offset on the given 'stop' element.
4762
// SVGAnimatedValue getOffset();
4765
//####################################################################
4767
//####################################################################
4770
* Get the attribute xml:space on the given element.
4772
DOMString getXmlspace();
4775
* Set the attribute xml:space on the given element.
4777
void setXmlspace(const DOMString &val) throw(DOMException);
4780
* Get the attribute type on the given 'style' element.
4782
// DOMString getType();
4785
* Set the attribute type on the given 'style' element.
4787
// void setType(const DOMString &val) throw(DOMException);
4790
* Get the attribute media on the given 'style' element.
4792
DOMString getMedia();
4795
* Set the attribute media on the given 'style' element.
4797
void setMedia(const DOMString &val) throw(DOMException);
4800
* Get the attribute title on the given 'style' element.
4802
DOMString getTitle();
4805
* Set the attribute title on the given 'style' element.
4807
void setTitle(const DOMString &val) throw(DOMException);
4809
//####################################################################
4810
//# SVGSymbolElement
4811
//####################################################################
4813
//####################################################################
4815
//####################################################################
4818
* Corresponds to attribute x on the given 'svg' element.
4820
// SVGAnimatedValue getX();
4823
* Corresponds to attribute y on the given 'svg' element.
4825
// SVGAnimatedValue getY();
4828
* Corresponds to attribute width on the given 'svg' element.
4830
// SVGAnimatedValue getWidth();
4833
* Corresponds to attribute height on the given 'svg' element.
4835
// SVGAnimatedValue getHeight();
4838
* Get the attribute contentScriptType on the given 'svg' element.
4840
DOMString getContentScriptType();
4843
* Set the attribute contentScriptType on the given 'svg' element.
4845
void setContentScriptType(const DOMString &val) throw(DOMException);
4849
* Get the attribute contentStyleType on the given 'svg' element.
4851
DOMString getContentStyleType();
4854
* Set the attribute contentStyleType on the given 'svg' element.
4856
void setContentStyleType(const DOMString &val) throw(DOMException);
4859
* The position and size of the viewport(implicit or explicit) that corresponds
4860
* to this 'svg' element. When the user agent is actually rendering the content,
4861
* then the position and size values represent the actual values when rendering.
4862
* The position and size values are unitless values in the coordinate system of
4863
* the parent element. If no parent element exists(i.e., 'svg' element
4864
* represents the root of the document tree), if this SVG document is embedded as
4865
* part of another document(e.g., via the HTML 'object' element), then the
4866
* position and size are unitless values in the coordinate system of the parent
4867
* document.(If the parent uses CSS or XSL layout, then unitless values
4868
* represent pixel units for the current CSS or XSL viewport, as described in the
4869
* CSS2 specification.) If the parent element does not have a coordinate system,
4870
* then the user agent should provide reasonable default values for this attribute.
4872
SVGRect getViewport();
4875
* Size of a pixel units(as defined by CSS2) along the x-axis of the viewport,
4876
* which represents a unit somewhere in the range of 70dpi to 120dpi, and, on
4877
* systems that support this, might actually match the characteristics of the
4878
* target medium. On systems where it is impossible to know the size of a pixel,
4879
* a suitable default pixel size is provided.
4881
double getPixelUnitToMillimeterX();
4884
* Corresponding size of a pixel unit along the y-axis of the viewport.
4886
double getPixelUnitToMillimeterY();
4889
* User interface(UI) events in DOM Level 2 indicate the screen positions at
4890
* which the given UI event occurred. When the user agent actually knows the
4891
* physical size of a "screen unit", this attribute will express that information;
4892
* otherwise, user agents will provide a suitable default value such as .28mm.
4894
double getScreenPixelToMillimeterX();
4897
* Corresponding size of a screen pixel along the y-axis of the viewport.
4899
double getScreenPixelToMillimeterY();
4903
* The initial view(i.e., before magnification and panning) of the current
4904
* innermost SVG document fragment can be either the "standard" view(i.e., based
4905
* on attributes on the 'svg' element such as fitBoxToViewport) or to a "custom"
4906
* view(i.e., a hyperlink into a particular 'view' or other element - see
4907
* Linking into SVG content: URI fragments and SVG views). If the initial view is
4908
* the "standard" view, then this attribute is false. If the initial view is a
4909
* "custom" view, then this attribute is true.
4911
bool getUseCurrentView();
4914
* Set the value above
4916
void setUseCurrentView(bool val) throw(DOMException);
4919
* The definition of the initial view(i.e., before magnification and panning) of
4920
* the current innermost SVG document fragment. The meaning depends on the
4923
* * If the initial view was a "standard" view, then:
4924
* o the values for viewBox, preserveAspectRatio and zoomAndPan within
4925
* currentView will match the values for the corresponding DOM attributes that
4926
* are on SVGSVGElement directly
4927
* o the values for transform and viewTarget within currentView will be null
4928
* * If the initial view was a link into a 'view' element, then:
4929
* o the values for viewBox, preserveAspectRatio and zoomAndPan within
4930
* currentView will correspond to the corresponding attributes for the given
4932
* o the values for transform and viewTarget within currentView will be null
4933
* * If the initial view was a link into another element(i.e., other than a
4935
* o the values for viewBox, preserveAspectRatio and zoomAndPan within
4936
* currentView will match the values for the corresponding DOM attributes that
4937
* are on SVGSVGElement directly for the closest ancestor 'svg' element
4938
* o the values for transform within currentView will be null
4939
* o the viewTarget within currentView will represent the target of the link
4940
* * If the initial view was a link into the SVG document fragment using an SVG
4941
* view specification fragment identifier(i.e., #svgView(...)), then:
4942
* o the values for viewBox, preserveAspectRatio, zoomAndPan, transform and
4943
* viewTarget within currentView will correspond to the values from the SVG view
4944
* specification fragment identifier
4947
SVGViewSpec getCurrentView();
4951
* This attribute indicates the current scale factor relative to the initial view
4952
* to take into account user magnification and panning operations, as described
4953
* under Magnification and panning. DOM attributes currentScale and
4954
* currentTranslate are equivalent to the 2x3 matrix [a b c d e f] =
4955
* [currentScale 0 0 currentScale currentTranslate.x currentTranslate.y]. If
4956
* "magnification" is enabled(i.e., zoomAndPan="magnify"), then the effect is as
4957
* if an extra transformation were placed at the outermost level on the SVG
4958
* document fragment(i.e., outside the outermost 'svg' element).
4960
double getCurrentScale();
4963
* Set the value above.
4965
void setCurrentScale(double val) throw(DOMException);
4968
* The corresponding translation factor that takes into account
4969
* user "magnification".
4971
SVGPoint getCurrentTranslate();
4974
* Takes a time-out value which indicates that redraw shall not occur until:(a)
4975
* the corresponding unsuspendRedraw(suspend_handle_id) call has been made,(b)
4976
* an unsuspendRedrawAll() call has been made, or(c) its timer has timed out. In
4977
* environments that do not support interactivity(e.g., print media), then
4978
* redraw shall not be suspended. suspend_handle_id =
4979
* suspendRedraw(max_wait_milliseconds) and unsuspendRedraw(suspend_handle_id)
4980
* must be packaged as balanced pairs. When you want to suspend redraw actions as
4981
* a collection of SVG DOM changes occur, then precede the changes to the SVG DOM
4982
* with a method call similar to suspend_handle_id =
4983
* suspendRedraw(max_wait_milliseconds) and follow the changes with a method call
4984
* similar to unsuspendRedraw(suspend_handle_id). Note that multiple
4985
* suspendRedraw calls can be used at once and that each such method call is
4986
* treated independently of the other suspendRedraw method calls.
4988
unsigned long suspendRedraw(unsigned long max_wait_milliseconds);
4991
* Cancels a specified suspendRedraw() by providing a unique suspend_handle_id.
4993
void unsuspendRedraw(unsigned long suspend_handle_id) throw(DOMException);
4996
* Cancels all currently active suspendRedraw() method calls. This method is most
4997
* useful at the very end of a set of SVG DOM calls to ensure that all pending
4998
* suspendRedraw() method calls have been cancelled.
5000
void unsuspendRedrawAll();
5003
* In rendering environments supporting interactivity, forces the user agent to
5004
* immediately redraw all regions of the viewport that require updating.
5009
* Suspends(i.e., pauses) all currently running animations that are defined
5010
* within the SVG document fragment corresponding to this 'svg' element, causing
5011
* the animation clock corresponding to this document fragment to stand still
5012
* until it is unpaused.
5014
void pauseAnimations();
5017
* Unsuspends(i.e., unpauses) currently running animations that are defined
5018
* within the SVG document fragment, causing the animation clock to continue from
5019
* the time at which it was suspended.
5021
void unpauseAnimations();
5024
* Returns true if this SVG document fragment is in a paused state.
5026
bool animationsPaused();
5029
* Returns the current time in seconds relative to the start time for
5030
* the current SVG document fragment.
5032
// double getCurrentTime();
5035
* Adjusts the clock for this SVG document fragment, establishing
5036
* a new current time.
5038
void setCurrentTime(double seconds);
5041
* Returns the list of graphics elements whose rendered content intersects the
5042
* supplied rectangle, honoring the 'pointer-events' property value on each
5043
* candidate graphics element.
5045
NodeList getIntersectionList(const SVGRect &rect,
5046
const SVGElementPtr referenceElement);
5049
* Returns the list of graphics elements whose rendered content is entirely
5050
* contained within the supplied rectangle, honoring the 'pointer-events'
5051
* property value on each candidate graphics element.
5053
NodeList getEnclosureList(const SVGRect &rect,
5054
const SVGElementPtr referenceElement);
5057
* Returns true if the rendered content of the given element intersects the
5058
* supplied rectangle, honoring the 'pointer-events' property value on each
5059
* candidate graphics element.
5061
bool checkIntersection(const SVGElementPtr element, const SVGRect &rect);
5064
* Returns true if the rendered content of the given element is entirely
5065
* contained within the supplied rectangle, honoring the 'pointer-events'
5066
* property value on each candidate graphics element.
5068
bool checkEnclosure(const SVGElementPtr element, const SVGRect &rect);
5071
* Unselects any selected objects, including any selections of text
5072
* strings and type-in bars.
5077
* Creates an SVGNumber object outside of any document trees. The object
5078
* is initialized to a value of zero.
5080
SVGNumber createSVGNumber();
5083
* Creates an SVGLength object outside of any document trees. The object
5084
* is initialized to the value of 0 user units.
5086
SVGLength createSVGLength();
5089
* Creates an SVGAngle object outside of any document trees. The object
5090
* is initialized to the value 0 degrees(unitless).
5092
SVGAngle createSVGAngle();
5095
* Creates an SVGPoint object outside of any document trees. The object
5096
* is initialized to the point(0,0) in the user coordinate system.
5098
SVGPoint createSVGPoint();
5101
* Creates an SVGMatrix object outside of any document trees. The object
5102
* is initialized to the identity matrix.
5104
SVGMatrix createSVGMatrix();
5107
* Creates an SVGRect object outside of any document trees. The object
5108
* is initialized such that all values are set to 0 user units.
5110
SVGRect createSVGRect();
5113
* Creates an SVGTransform object outside of any document trees.
5114
* The object is initialized to an identity matrix transform
5115
* (SVG_TRANSFORM_MATRIX).
5117
SVGTransform createSVGTransform();
5120
* Creates an SVGTransform object outside of any document trees.
5121
* The object is initialized to the given matrix transform
5122
* (i.e., SVG_TRANSFORM_MATRIX).
5124
SVGTransform createSVGTransformFromMatrix(const SVGMatrix &matrix);
5127
* Searches this SVG document fragment(i.e., the search is restricted to a
5128
* subset of the document tree) for an Element whose id is given by elementId. If
5129
* an Element is found, that Element is returned. If no such element exists,
5130
* returns null. Behavior is not defined if more than one element has this id.
5132
ElementPtr getElementById(const DOMString& elementId);
5135
//####################################################################
5137
//####################################################################
5140
//####################################################################
5141
//# SVGTextContentElement
5142
//####################################################################
5146
* lengthAdjust Types
5150
LENGTHADJUST_UNKNOWN = 0,
5151
LENGTHADJUST_SPACING = 1,
5152
LENGTHADJUST_SPACINGANDGLYPHS = 2
5157
* Corresponds to attribute textLength on the given element.
5159
SVGAnimatedValue getTextLength();
5163
* Corresponds to attribute lengthAdjust on the given element. The value must be
5164
* one of the length adjust constants specified above.
5166
SVGAnimatedValue getLengthAdjust();
5170
* Returns the total number of characters to be rendered within the current
5171
* element. Includes characters which are included via a 'tref' reference.
5173
long getNumberOfChars();
5176
* The total sum of all of the advance values from rendering all of the
5177
* characters within this element, including the advance value on the glyphs
5178
*(horizontal or vertical), the effect of properties 'kerning', 'letter-spacing'
5179
* and 'word-spacing' and adjustments due to attributes dx and dy on 'tspan'
5180
* elements. For non-rendering environments, the user agent shall make reasonable
5181
* assumptions about glyph metrics.
5183
double getComputedTextLength();
5186
* The total sum of all of the advance values from rendering the specified
5187
* substring of the characters, including the advance value on the glyphs
5188
*(horizontal or vertical), the effect of properties 'kerning', 'letter-spacing'
5189
* and 'word-spacing' and adjustments due to attributes dx and dy on 'tspan'
5190
* elements. For non-rendering environments, the user agent shall make reasonable
5191
* assumptions about glyph metrics.
5193
double getSubStringLength(unsigned long charnum, unsigned long nchars)
5194
throw(DOMException);
5197
* Returns the current text position before rendering the character in the user
5198
* coordinate system for rendering the glyph(s) that correspond to the specified
5199
* character. The current text position has already taken into account the
5200
* effects of any inter-character adjustments due to properties 'kerning',
5201
* 'letter-spacing' and 'word-spacing' and adjustments due to attributes x, y, dx
5202
* and dy. If multiple consecutive characters are rendered inseparably(e.g., as
5203
* a single glyph or a sequence of glyphs), then each of the inseparable
5204
* characters will return the start position for the first glyph.
5206
SVGPoint getStartPositionOfChar(unsigned long charnum) throw(DOMException);
5209
* Returns the current text position after rendering the character in the user
5210
* coordinate system for rendering the glyph(s) that correspond to the specified
5211
* character. This current text position does not take into account the effects
5212
* of any inter-character adjustments to prepare for the next character, such as
5213
* properties 'kerning', 'letter-spacing' and 'word-spacing' and adjustments due
5214
* to attributes x, y, dx and dy. If multiple consecutive characters are rendered
5215
* inseparably(e.g., as a single glyph or a sequence of glyphs), then each of
5216
* the inseparable characters will return the end position for the last glyph.
5218
SVGPoint getEndPositionOfChar(unsigned long charnum) throw(DOMException);
5221
* Returns a tightest rectangle which defines the minimum and maximum X and Y
5222
* values in the user coordinate system for rendering the glyph(s) that
5223
* correspond to the specified character. The calculations assume that all glyphs
5224
* occupy the full standard glyph cell for the font. If multiple consecutive
5225
* characters are rendered inseparably(e.g., as a single glyph or a sequence of
5226
* glyphs), then each of the inseparable characters will return the same extent.
5228
SVGRect getExtentOfChar(unsigned long charnum) throw(DOMException);
5231
* Returns the rotation value relative to the current user coordinate system used
5232
* to render the glyph(s) corresponding to the specified character. If multiple
5233
* glyph(s) are used to render the given character and the glyphs each have
5234
* different rotations(e.g., due to text-on-a-path), the user agent shall return
5235
* an average value(e.g., the rotation angle at the midpoint along the path for
5236
* all glyphs used to render this character). The rotation value represents the
5237
* rotation that is supplemental to any rotation due to properties
5238
* 'glyph-orientation-horizontal' and 'glyph-orientation-vertical'; thus, any
5239
* glyph rotations due to these properties are not included into the returned
5240
* rotation value. If multiple consecutive characters are rendered inseparably
5241
*(e.g., as a single glyph or a sequence of glyphs), then each of the
5242
* inseparable characters will return the same rotation value.
5244
double getRotationOfChar(unsigned long charnum) throw(DOMException);
5247
* Returns the index of the character whose corresponding glyph cell bounding box
5248
* contains the specified point. The calculations assume that all glyphs occupy
5249
* the full standard glyph cell for the font. If no such character exists, a
5250
* value of -1 is returned. If multiple such characters exist, the character
5251
* within the element whose glyphs were rendered last(i.e., take into account
5252
* any reordering such as for bidirectional text) is used. If multiple
5253
* consecutive characters are rendered inseparably(e.g., as a single glyph or a
5254
* sequence of glyphs), then the user agent shall allocate an equal percentage of
5255
* the text advance amount to each of the contributing characters in determining
5256
* which of the characters is chosen.
5258
long getCharNumAtPosition(const SVGPoint &point);
5261
* Causes the specified substring to be selected just as if the user
5262
* selected the substring interactively.
5264
void selectSubString(unsigned long charnum, unsigned long nchars)
5265
throw(DOMException);
5271
//####################################################################
5272
//# SVGTextPathElement
5273
//####################################################################
5277
* textPath Method Types
5281
TEXTPATH_METHODTYPE_UNKNOWN = 0,
5282
TEXTPATH_METHODTYPE_ALIGN = 1,
5283
TEXTPATH_METHODTYPE_STRETCH = 2
5284
} TextPathMethodType;
5287
* textPath Spacing Types
5291
TEXTPATH_SPACINGTYPE_UNKNOWN = 0,
5292
TEXTPATH_SPACINGTYPE_AUTO = 1,
5293
TEXTPATH_SPACINGTYPE_EXACT = 2
5294
} TextPathSpacingType;
5298
* Corresponds to attribute startOffset on the given 'textPath' element.
5300
SVGAnimatedValue getStartOffset();
5303
* Corresponds to attribute method on the given 'textPath' element. The value
5304
* must be one of the method type constants specified above.
5306
SVGAnimatedValue getMethod();
5309
* Corresponds to attribute spacing on the given 'textPath' element.
5310
* The value must be one of the spacing type constants specified above.
5312
SVGAnimatedValue getSpacing();
5315
//####################################################################
5316
//# SVGTextPositioningElement
5317
//####################################################################
5321
* Corresponds to attribute x on the given element.
5323
// SVGAnimatedValue getX();
5326
* Corresponds to attribute y on the given element.
5328
// SVGAnimatedValue getY();
5331
* Corresponds to attribute dx on the given element.
5333
// SVGAnimatedValue getDx();
5336
* Corresponds to attribute dy on the given element.
5338
// SVGAnimatedValue getDy();
5342
* Corresponds to attribute rotate on the given element.
5344
SVGAnimatedValueList getRotate();
5347
//####################################################################
5349
//####################################################################
5351
//####################################################################
5353
//####################################################################
5355
//####################################################################
5357
//####################################################################
5359
//####################################################################
5360
//# SVGSwitchElement
5361
//####################################################################
5363
//####################################################################
5365
//####################################################################
5368
* Corresponds to attribute x on the given 'use' element.
5370
// SVGAnimatedValue getX();
5373
* Corresponds to attribute y on the given 'use' element.
5375
// SVGAnimatedValue getY();
5378
* Corresponds to attribute width on the given 'use' element.
5380
// SVGAnimatedValue getWidth();
5383
* Corresponds to attribute height on the given 'use' element.
5385
// SVGAnimatedValue getHeight();
5388
* The root of the "instance tree". See description of SVGElementInstance for
5389
* a discussion on the instance tree.
5391
SVGElementInstance getInstanceRoot();
5394
* If the 'href' attribute is being animated, contains the current animated root
5395
* of the "instance tree". If the 'href' attribute is not currently being
5396
* animated, contains the same value as 'instanceRoot'. The root of the "instance
5397
* tree". See description of SVGElementInstance for a discussion on the instance
5400
SVGElementInstance getAnimatedInstanceRoot();
5402
//####################################################################
5404
//####################################################################
5406
//####################################################################
5408
//####################################################################
5414
SVGValueList getViewTarget();
5419
//##################
5421
//##################
5434
/*#########################################################################
5436
#########################################################################*/
5439
* When an 'svg' element is embedded inline as a component of a document from
5440
* another namespace, such as when an 'svg' element is embedded inline within an
5441
* XHTML document [XHTML], then an SVGDocument object will not exist; instead,
5442
* the root object in the document object hierarchy will be a Document object of
5443
* a different type, such as an HTMLDocument object.
5445
* However, an SVGDocument object will indeed exist when the root element of the
5446
* XML document hierarchy is an 'svg' element, such as when viewing a stand-alone
5447
* SVG file(i.e., a file with MIME type "image/svg+xml"). In this case, the
5448
* SVGDocument object will be the root object of the document object model
5451
* In the case where an SVG document is embedded by reference, such as when an
5452
* XHTML document has an 'object' element whose href attribute references an SVG
5453
* document(i.e., a document whose MIME type is "image/svg+xml" and whose root
5454
* element is thus an 'svg' element), there will exist two distinct DOM
5455
* hierarchies. The first DOM hierarchy will be for the referencing document
5456
*(e.g., an XHTML document). The second DOM hierarchy will be for the referenced
5457
* SVG document. In this second DOM hierarchy, the root object of the document
5458
* object model hierarchy is an SVGDocument object.
5460
class SVGDocument : public Document,
5461
public events::DocumentEvent
5467
* The title of a document as specified by the title sub-element of the 'svg'
5468
* root element(i.e., <svg><title>Here is the title</title>...</svg>)
5470
DOMString getTitle();
5473
* Returns the URI of the page that linked to this page. The value is an empty
5474
* string if the user navigated to the page directly(not through a link, but,
5475
* for example, via a bookmark).
5477
DOMString getReferrer();
5480
* The domain name of the server that served the document, or a null string if
5481
* the server cannot be identified by a domain name.
5483
DOMString getDomain();
5486
* The complete URI of the document.
5491
* The root 'svg' element in the document hierarchy.
5493
SVGElementPtr getRootElement();
5496
//##################
5498
//##################
5509
/*#########################################################################
5511
#########################################################################*/
5514
* In the case where an SVG document is embedded by reference, such as when an
5515
* XHTML document has an 'object' element whose href(or equivalent) attribute
5516
* references an SVG document(i.e., a document whose MIME type is
5517
* "image/svg+xml" and whose root element is thus an 'svg' element), the SVG user
5518
* agent is required to implement the GetSVGDocument interface for the element
5519
* which references the SVG document(e.g., the HTML 'object' or comparable
5520
* referencing elements).
5522
class GetSVGDocument
5527
* Returns the SVGDocument object for the referenced SVG document.
5529
SVGDocumentPtr getSVGDocument()
5530
throw(DOMException);
5532
//##################
5534
//##################
5539
~GetSVGDocument() {}
5555
/*#########################################################################
5556
## E N D O F F I L E
5557
#########################################################################*/